Skip to content

Commit

Permalink
Merge pull request #3138 from steemit/20181101-fix-rc-pre-apply-opera…
Browse files Browse the repository at this point in the history
…tion-visitor

Grab head_block_time and head_block_number in visitor constructor
  • Loading branch information
Michael Vandeberg committed Nov 2, 2018
2 parents 30668ec + 62df8f2 commit 7e50f3e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libraries/plugins/rc/rc_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,11 @@ struct pre_apply_operation_visitor
rc_plugin_skip_flags _skip;

pre_apply_operation_visitor( database& db ) : _db(db)
{}
{
const auto& gpo = _db.get_dynamic_global_properties();
_current_time = gpo.time.sec_since_epoch();
_current_block_number = gpo.head_block_number;
}

void regenerate( const account_object& account, const rc_account_object& rc_account )const
{
Expand Down

0 comments on commit 7e50f3e

Please sign in to comment.