Merge branch 'feature/SONs-base' into feature/SON-203
This commit is contained in:
commit
9f5269e808
4 changed files with 17 additions and 9 deletions
|
|
@ -83,6 +83,7 @@ void_result delete_son_evaluator::do_apply(const son_delete_operation& op)
|
|||
linear_vesting_policy new_vesting_policy;
|
||||
new_vesting_policy.begin_timestamp = db().head_block_time();
|
||||
new_vesting_policy.vesting_cliff_seconds = db().get_global_properties().parameters.son_vesting_period();
|
||||
new_vesting_policy.begin_balance = deposit.balance.amount;
|
||||
|
||||
db().modify(son->deposit(db()), [&new_vesting_policy](vesting_balance_object &vbo) {
|
||||
vbo.policy = new_vesting_policy;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <fc/log/logger.hpp>
|
||||
#include <graphene/peerplays_sidechain/sidechain_net_manager.hpp>
|
||||
#include <graphene/utilities/key_conversion.hpp>
|
||||
|
||||
namespace bpo = boost::program_options;
|
||||
|
||||
|
|
@ -51,15 +52,15 @@ void peerplays_sidechain_plugin::plugin_set_program_options(
|
|||
boost::program_options::options_description& cfg
|
||||
)
|
||||
{
|
||||
auto default_priv_key = fc::ecc::private_key::regenerate(fc::sha256::hash(std::string("nathan")));
|
||||
string son_id_example = fc::json::to_string(chain::son_id_type(5));
|
||||
|
||||
cli.add_options()
|
||||
//("bitcoin-node-ip", bpo::value<string>()->implicit_value("127.0.0.1"), "IP address of Bitcoin node")
|
||||
//("bitcoin-node-zmq-port", bpo::value<uint32_t>()->implicit_value(28332), "ZMQ port of Bitcoin node")
|
||||
//("bitcoin-node-rpc-port", bpo::value<uint32_t>()->implicit_value(18332), "RPC port of Bitcoin node")
|
||||
//("bitcoin-node-rpc-user", bpo::value<string>(), "Bitcoin RPC user")
|
||||
//("bitcoin-node-rpc-password", bpo::value<string>(), "Bitcoin RPC password")
|
||||
//("bitcoin-address", bpo::value<string>(), "Bitcoin address")
|
||||
//("bitcoin-public-key", bpo::value<string>(), "Bitcoin public key")
|
||||
//("bitcoin-private-key", bpo::value<string>(), "Bitcoin private key")
|
||||
("son-id,w", bpo::value<vector<string>>(), ("ID of SON controlled by this node (e.g. " + son_id_example + ", quotes are required)").c_str())
|
||||
("peerplays-private-key", bpo::value<vector<string>>()->composing()->multitoken()->
|
||||
DEFAULT_VALUE_VECTOR(std::make_pair(chain::public_key_type(default_priv_key.get_public_key()), graphene::utilities::key_to_wif(default_priv_key))),
|
||||
"Tuple of [PublicKey, WIF private key]")
|
||||
|
||||
("bitcoin-node-ip", bpo::value<string>()->default_value("99.79.189.95"), "IP address of Bitcoin node")
|
||||
("bitcoin-node-zmq-port", bpo::value<uint32_t>()->default_value(11111), "ZMQ port of Bitcoin node")
|
||||
("bitcoin-node-rpc-port", bpo::value<uint32_t>()->default_value(22222), "RPC port of Bitcoin node")
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ target_link_libraries( chain_bench graphene_chain graphene_app graphene_account_
|
|||
|
||||
file(GLOB APP_SOURCES "app/*.cpp")
|
||||
add_executable( app_test ${APP_SOURCES} )
|
||||
target_link_libraries( app_test graphene_app graphene_account_history graphene_bookie graphene_net graphene_chain graphene_egenesis_none fc ${PLATFORM_SPECIFIC_LIBS} )
|
||||
target_link_libraries( app_test graphene_app graphene_account_history graphene_witness graphene_bookie graphene_net graphene_chain graphene_egenesis_none fc ${PLATFORM_SPECIFIC_LIBS} )
|
||||
|
||||
file(GLOB INTENSE_SOURCES "intense/*.cpp")
|
||||
add_executable( intense_test ${INTENSE_SOURCES} ${COMMON_SOURCES} )
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
#include <graphene/utilities/tempdir.hpp>
|
||||
|
||||
#include <graphene/account_history/account_history_plugin.hpp>
|
||||
#include <graphene/witness/witness.hpp>
|
||||
#include <graphene/market_history/market_history_plugin.hpp>
|
||||
|
||||
#include <fc/thread/thread.hpp>
|
||||
#include <fc/smart_ref_impl.hpp>
|
||||
|
|
@ -57,6 +59,8 @@ BOOST_AUTO_TEST_CASE( two_node_network )
|
|||
|
||||
graphene::app::application app1;
|
||||
app1.register_plugin<graphene::account_history::account_history_plugin>();
|
||||
app1.register_plugin<graphene::witness_plugin::witness_plugin>();
|
||||
app1.register_plugin<graphene::market_history::market_history_plugin>();
|
||||
boost::program_options::variables_map cfg;
|
||||
cfg.emplace("p2p-endpoint", boost::program_options::variable_value(string("127.0.0.1:0"), false));
|
||||
app1.initialize(app_dir.path(), cfg);
|
||||
|
|
@ -72,6 +76,8 @@ BOOST_AUTO_TEST_CASE( two_node_network )
|
|||
|
||||
graphene::app::application app2;
|
||||
app2.register_plugin<account_history::account_history_plugin>();
|
||||
app2.register_plugin<graphene::witness_plugin::witness_plugin>();
|
||||
app2.register_plugin<graphene::market_history::market_history_plugin>();
|
||||
cfg2.erase("p2p-endpoint");
|
||||
cfg2.emplace("p2p-endpoint", boost::program_options::variable_value(string("127.0.0.1:0"), false));
|
||||
cfg2.emplace("seed-node", boost::program_options::variable_value(vector<string>{endpoint1}, false));
|
||||
|
|
|
|||
Loading…
Reference in a new issue