Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions libraries/chain/son_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
} );
}
}
Expand Down