Merge branch 'develop' into feature/GRPH-93
This commit is contained in:
commit
67362be337
5 changed files with 39 additions and 29 deletions
|
|
@ -1,36 +1,28 @@
|
||||||
stages:
|
stages:
|
||||||
- pull
|
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
|
||||||
before_script:
|
build:
|
||||||
- cd /var/www/Projects/595.peerplays/blockchain
|
|
||||||
|
|
||||||
pulljob:
|
|
||||||
stage: pull
|
|
||||||
script:
|
|
||||||
- git pull origin master
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
tags:
|
|
||||||
- pp-dev
|
|
||||||
|
|
||||||
buildjob:
|
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
|
- git submodule update --init --recursive
|
||||||
- cmake .
|
- cmake .
|
||||||
- make
|
- make -j$(nproc)
|
||||||
only:
|
artifacts:
|
||||||
- master
|
untracked: true
|
||||||
|
paths:
|
||||||
|
- libraries/
|
||||||
|
- programs/
|
||||||
|
- tests/
|
||||||
tags:
|
tags:
|
||||||
- pp-dev
|
- builder
|
||||||
|
|
||||||
testjob:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
|
dependencies:
|
||||||
|
- build
|
||||||
script:
|
script:
|
||||||
|
- ./tests/betting_test
|
||||||
- ./tests/chain_test
|
- ./tests/chain_test
|
||||||
- ./tests/tournament_test
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
tags:
|
tags:
|
||||||
- pp-dev
|
- builder
|
||||||
|
|
@ -119,7 +119,9 @@ void database::reindex(fc::path data_dir, const genesis_state_type& initial_allo
|
||||||
void database::wipe(const fc::path& data_dir, bool include_blocks)
|
void database::wipe(const fc::path& data_dir, bool include_blocks)
|
||||||
{
|
{
|
||||||
ilog("Wiping database", ("include_blocks", include_blocks));
|
ilog("Wiping database", ("include_blocks", include_blocks));
|
||||||
close();
|
if (_opened) {
|
||||||
|
close();
|
||||||
|
}
|
||||||
object_database::wipe(data_dir);
|
object_database::wipe(data_dir);
|
||||||
if( include_blocks )
|
if( include_blocks )
|
||||||
fc::remove_all( data_dir / "database" );
|
fc::remove_all( data_dir / "database" );
|
||||||
|
|
@ -148,12 +150,16 @@ void database::open(
|
||||||
("last_block->id", last_block->id())("head_block_num",head_block_num()) );
|
("last_block->id", last_block->id())("head_block_num",head_block_num()) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_opened = true;
|
||||||
}
|
}
|
||||||
FC_CAPTURE_LOG_AND_RETHROW( (data_dir) )
|
FC_CAPTURE_LOG_AND_RETHROW( (data_dir) )
|
||||||
}
|
}
|
||||||
|
|
||||||
void database::close(bool rewind)
|
void database::close(bool rewind)
|
||||||
{
|
{
|
||||||
|
if (!_opened)
|
||||||
|
return;
|
||||||
|
|
||||||
// TODO: Save pending tx's on close()
|
// TODO: Save pending tx's on close()
|
||||||
clear_pending();
|
clear_pending();
|
||||||
|
|
||||||
|
|
@ -198,6 +204,8 @@ void database::close(bool rewind)
|
||||||
_block_id_to_block.close();
|
_block_id_to_block.close();
|
||||||
|
|
||||||
_fork_db.reset();
|
_fork_db.reset();
|
||||||
|
|
||||||
|
_opened = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void database::force_slow_replays()
|
void database::force_slow_replays()
|
||||||
|
|
|
||||||
|
|
@ -561,6 +561,15 @@ namespace graphene { namespace chain {
|
||||||
node_property_object _node_property_object;
|
node_property_object _node_property_object;
|
||||||
fc::hash_ctr_rng<secret_hash_type, 20> _random_number_generator;
|
fc::hash_ctr_rng<secret_hash_type, 20> _random_number_generator;
|
||||||
bool _slow_replays = false;
|
bool _slow_replays = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether database is successfully opened or not.
|
||||||
|
*
|
||||||
|
* The database is considered open when there's no exception
|
||||||
|
* or assertion fail during database::open() method, and
|
||||||
|
* database::close() has not been called, or failed during execution.
|
||||||
|
*/
|
||||||
|
bool _opened = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 94b046dce6bb86fd22abd1831fc9056103f4aa5d
|
Subproject commit 443f858d9b4733bb6d894da9315ce00ac3246065
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
#include <fc/crypto/base58.hpp>
|
#include <fc/crypto/base58.hpp>
|
||||||
|
|
||||||
#include <fc/crypto/aes.hpp>
|
#include <fc/crypto/aes.hpp>
|
||||||
|
#include <fc/smart_ref_impl.hpp>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifndef _WIN32_WINNT
|
#ifndef _WIN32_WINNT
|
||||||
|
|
@ -210,7 +211,7 @@ public:
|
||||||
wallet_data.ws_password = "";
|
wallet_data.ws_password = "";
|
||||||
websocket_connection = websocket_client.connect( wallet_data.ws_server );
|
websocket_connection = websocket_client.connect( wallet_data.ws_server );
|
||||||
|
|
||||||
api_connection = std::make_shared<fc::rpc::websocket_api_connection>(*websocket_connection);
|
api_connection = std::make_shared<fc::rpc::websocket_api_connection>(websocket_connection);
|
||||||
|
|
||||||
remote_login_api = api_connection->get_remote_api< graphene::app::login_api >(1);
|
remote_login_api = api_connection->get_remote_api< graphene::app::login_api >(1);
|
||||||
BOOST_CHECK(remote_login_api->login( wallet_data.ws_user, wallet_data.ws_password ) );
|
BOOST_CHECK(remote_login_api->login( wallet_data.ws_user, wallet_data.ws_password ) );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue