[SON-24] - SON Rewards missing serialisations and end to end testing (#313)

Co-authored-by: satyakoneru <15652887+satyakoneru@users.noreply.github.com>
This commit is contained in:
sierra19XX 2020-03-20 18:30:32 +11:00 committed by GitHub
parent ed4ebfdb80
commit 096af5e77c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -79,7 +79,7 @@ namespace graphene { namespace chain {
time_point_sec last_budget_time;
share_type witness_budget;
//Last SON Payout time, it can be different to the maintenance interval time
time_point_sec last_son_payout_time;
time_point_sec last_son_payout_time = HARDFORK_SON_TIME;
share_type son_budget = 0;
uint32_t accounts_registered_this_interval = 0;
/**
@ -138,6 +138,8 @@ FC_REFLECT_DERIVED( graphene::chain::dynamic_global_property_object, (graphene::
(next_maintenance_time)
(last_budget_time)
(witness_budget)
(last_son_payout_time)
(son_budget)
(accounts_registered_this_interval)
(recently_missed_count)
(current_aslot)

View file

@ -141,6 +141,8 @@ object_id_type son_heartbeat_evaluator::do_apply(const son_heartbeat_operation&
{
sso.current_interval_downtime += op.ts.sec_since_epoch() - sso.last_down_timestamp.sec_since_epoch();
sso.last_active_timestamp = op.ts;
// TODO: Remove me after sidechain tx signing is finished
sso.txs_signed = sso.txs_signed + 1;
} );
db().modify(*itr, [&is_son_active](son_object &so) {
@ -154,6 +156,8 @@ object_id_type son_heartbeat_evaluator::do_apply(const son_heartbeat_operation&
db().modify( itr->statistics( db() ), [&]( son_statistics_object& sso )
{
sso.last_active_timestamp = op.ts;
// TODO: Remove me after sidechain tx signing is finished
sso.txs_signed = sso.txs_signed + 1;
} );
}
}