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

Commit

Permalink
Fixed peer review comments #172
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Nov 2, 2017
1 parent 3ef0567 commit ce30439
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libraries/chain/chain_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1227,14 +1227,15 @@ void chain_controller::initialize_chain(chain_initializer_interface& starter)
for (int i = 0; i < 0x10000; i++)
_db.create<block_summary_object>([&](block_summary_object&) {});

// create a dummy block and cycle for our dummy transactions to send to applied_irreversible_block below
signed_block block{};
block.cycles.emplace_back();
block.cycles[0].emplace_back();

auto messages = starter.prepare_database(*this, _db);
std::for_each(messages.begin(), messages.end(), [&](const Message& m) {
MessageOutput output;
ProcessedTransaction trx; /// dummy tranaction required for scope validation
ProcessedTransaction trx; /// dummy transaction required for scope validation
std::sort(trx.scope.begin(), trx.scope.end() );
with_skip_flags(skip_scope_check | skip_transaction_signatures | skip_authority_check | received_block, [&](){
process_message(trx,m.code,m,output);
Expand Down Expand Up @@ -1291,7 +1292,7 @@ void chain_controller::replay() {
ilog("Replaying blockchain");
auto start = fc::time_point::now();

auto on_exit = fc::make_scoped_exit([this](){
auto on_exit = fc::make_scoped_exit([&_currently_replaying_blocks = _currently_replaying_blocks](){
_currently_replaying_blocks = false;
});
_currently_replaying_blocks = true;
Expand Down

0 comments on commit ce30439

Please sign in to comment.