Compare commits

...

2 commits

Author SHA1 Message Date
gladcow
1a2a329543 fix son_delete_test 2019-12-05 19:00:00 +03:00
gladcow
216e97d998 fix app_test 2019-12-05 19:00:00 +03:00
3 changed files with 8 additions and 1 deletions

View file

@ -83,6 +83,7 @@ void_result delete_son_evaluator::do_apply(const son_delete_operation& op)
linear_vesting_policy new_vesting_policy; linear_vesting_policy new_vesting_policy;
new_vesting_policy.begin_timestamp = db().head_block_time(); 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.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) { db().modify(son->deposit(db()), [&new_vesting_policy](vesting_balance_object &vbo) {
vbo.policy = new_vesting_policy; vbo.policy = new_vesting_policy;

View file

@ -23,7 +23,7 @@ target_link_libraries( chain_bench graphene_chain graphene_app graphene_account_
file(GLOB APP_SOURCES "app/*.cpp") file(GLOB APP_SOURCES "app/*.cpp")
add_executable( app_test ${APP_SOURCES} ) 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") file(GLOB INTENSE_SOURCES "intense/*.cpp")
add_executable( intense_test ${INTENSE_SOURCES} ${COMMON_SOURCES} ) add_executable( intense_test ${INTENSE_SOURCES} ${COMMON_SOURCES} )

View file

@ -29,6 +29,8 @@
#include <graphene/utilities/tempdir.hpp> #include <graphene/utilities/tempdir.hpp>
#include <graphene/account_history/account_history_plugin.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/thread/thread.hpp>
#include <fc/smart_ref_impl.hpp> #include <fc/smart_ref_impl.hpp>
@ -57,6 +59,8 @@ BOOST_AUTO_TEST_CASE( two_node_network )
graphene::app::application app1; graphene::app::application app1;
app1.register_plugin<graphene::account_history::account_history_plugin>(); 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; boost::program_options::variables_map cfg;
cfg.emplace("p2p-endpoint", boost::program_options::variable_value(string("127.0.0.1:0"), false)); cfg.emplace("p2p-endpoint", boost::program_options::variable_value(string("127.0.0.1:0"), false));
app1.initialize(app_dir.path(), cfg); app1.initialize(app_dir.path(), cfg);
@ -72,6 +76,8 @@ BOOST_AUTO_TEST_CASE( two_node_network )
graphene::app::application app2; graphene::app::application app2;
app2.register_plugin<account_history::account_history_plugin>(); 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.erase("p2p-endpoint");
cfg2.emplace("p2p-endpoint", boost::program_options::variable_value(string("127.0.0.1:0"), false)); 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)); cfg2.emplace("seed-node", boost::program_options::variable_value(vector<string>{endpoint1}, false));