[SON-24] - SON Rewards missing serialisations and end to end testing
This commit is contained in:
parent
ed4ebfdb80
commit
bc5fe7aa53
2 changed files with 7 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ namespace graphene { namespace chain {
|
||||||
time_point_sec last_budget_time;
|
time_point_sec last_budget_time;
|
||||||
share_type witness_budget;
|
share_type witness_budget;
|
||||||
//Last SON Payout time, it can be different to the maintenance interval time
|
//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;
|
share_type son_budget = 0;
|
||||||
uint32_t accounts_registered_this_interval = 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)
|
(next_maintenance_time)
|
||||||
(last_budget_time)
|
(last_budget_time)
|
||||||
(witness_budget)
|
(witness_budget)
|
||||||
|
(last_son_payout_time)
|
||||||
|
(son_budget)
|
||||||
(accounts_registered_this_interval)
|
(accounts_registered_this_interval)
|
||||||
(recently_missed_count)
|
(recently_missed_count)
|
||||||
(current_aslot)
|
(current_aslot)
|
||||||
|
|
|
||||||
|
|
@ -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.current_interval_downtime += op.ts.sec_since_epoch() - sso.last_down_timestamp.sec_since_epoch();
|
||||||
sso.last_active_timestamp = op.ts;
|
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) {
|
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 )
|
db().modify( itr->statistics( db() ), [&]( son_statistics_object& sso )
|
||||||
{
|
{
|
||||||
sso.last_active_timestamp = op.ts;
|
sso.last_active_timestamp = op.ts;
|
||||||
|
// TODO: Remove me after sidechain tx signing is finished
|
||||||
|
sso.txs_signed = sso.txs_signed + 1;
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue