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

Commit

Permalink
Merge pull request #7211 from EOSIO/feature/commit-db-if-disable-repl…
Browse files Browse the repository at this point in the history
…ay-opts

commit db during replays when replay optimizations are disabled
  • Loading branch information
arhag committed Apr 25, 2019
2 parents 9247373 + 0679e56 commit b38ec13
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit b38ec13

Please sign in to comment.