Fix the tests

This commit is contained in:
satyakoneru 2020-05-01 09:25:34 +00:00
parent 37dd5571b3
commit 430a129013
3 changed files with 3 additions and 4 deletions

View file

@ -300,7 +300,7 @@ struct get_impacted_account_visitor
_impacted.insert( op.owner_account ); _impacted.insert( op.owner_account );
} }
void operator()( const son_deregister_operation& op ) { void operator()( const son_deregister_operation& op ) {
_impacted.insert( op.owner_account ); _impacted.insert( op.payer);
} }
void operator()( const son_heartbeat_operation& op ) { void operator()( const son_heartbeat_operation& op ) {
_impacted.insert( op.owner_account ); _impacted.insert( op.owner_account );

View file

@ -2055,7 +2055,7 @@ public:
std::inserter(result, result.end()), std::inserter(result, result.end()),
[](fc::optional<account_object>& acct, fc::optional<son_object> son) { [](fc::optional<account_object>& acct, fc::optional<son_object> son) {
FC_ASSERT(acct, "Invalid active SONs list in global properties."); FC_ASSERT(acct, "Invalid active SONs list in global properties.");
if (son.valid()) if (son.valid() && son->status != son_status::deregistered)
return std::make_pair<string, son_id_type>(string(acct->name), std::move(son->id)); return std::make_pair<string, son_id_type>(string(acct->name), std::move(son->id));
return std::make_pair<string, son_id_type>(string(acct->name), std::move(son_id_type())); return std::make_pair<string, son_id_type>(string(acct->name), std::move(son_id_type()));
}); });

View file

@ -214,7 +214,7 @@ try {
BOOST_REQUIRE( idx.size() == 1 ); BOOST_REQUIRE( idx.size() == 1 );
BOOST_REQUIRE( obj->status == son_status::deregistered ); BOOST_REQUIRE( obj->status == son_status::deregistered );
BOOST_REQUIRE( son_stats_obj->deregistered_timestamp == db.head_block_time() ); BOOST_REQUIRE( son_stats_obj->deregistered_timestamp == now );
deposit_vesting = db.get<vesting_balance_object>(vesting_balance_id_type(0)); deposit_vesting = db.get<vesting_balance_object>(vesting_balance_id_type(0));
BOOST_CHECK_EQUAL(deposit_vesting.policy.get<linear_vesting_policy>().vesting_cliff_seconds, BOOST_CHECK_EQUAL(deposit_vesting.policy.get<linear_vesting_policy>().vesting_cliff_seconds,
@ -267,7 +267,6 @@ try {
// bob tries to deregister a son object he dont own // bob tries to deregister a son object he dont own
{ {
son_deregister_operation op; son_deregister_operation op;
op.owner_account = bob_id;
op.son_id = son_id_type(0); op.son_id = son_id_type(0);
op.payer = bob_id; op.payer = bob_id;