Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

commit db during replays when replay optimizations are disabled #7211

Merged
merged 1 commit into from
Apr 25, 2019
Merged
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
5 changes: 5 additions & 0 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1846,6 +1846,11 @@ struct controller_impl {
// On replay, log_irreversible is not called and so no irreversible_block signal is emittted.
// So emit it explicitly here.
emit( self.irreversible_block, bsp );

if (!self.skip_db_sessions(s)) {
db.commit(bsp->block_num);
}

} else {
EOS_ASSERT( read_mode != db_read_mode::IRREVERSIBLE, block_validate_exception,
"invariant failure: cannot replay reversible blocks while in irreversible mode" );
Expand Down