Skip to content

Commit

Permalink
Fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
clemahieu committed Apr 20, 2018
1 parent 6c7f805 commit f69b3ac
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions rai/node/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,23 +1030,23 @@ void rai::bootstrap_attempt::process_fork (MDB_txn * transaction_a, std::shared_
{
std::weak_ptr<rai::bootstrap_attempt> this_w (shared_from_this ());
if (!node->active.start (transaction_a, std::make_pair (ledger_block, block_a), [this_w, root](std::shared_ptr<rai::block>, bool resolved) {
if (auto this_l = this_w.lock ())
{
if (resolved)
{
rai::transaction transaction (this_l->node->store.environment, nullptr, false);
auto account (this_l->node->ledger.store.frontier_get (transaction, root));
if (!account.is_zero ())
{
this_l->requeue_pull (rai::pull_info (account, root, root));
}
else if (this_l->node->ledger.store.account_exists (transaction, root))
{
this_l->requeue_pull (rai::pull_info (root, rai::block_hash (0), rai::block_hash (0)));
}
}
}
}))
if (auto this_l = this_w.lock ())
{
if (resolved)
{
rai::transaction transaction (this_l->node->store.environment, nullptr, false);
auto account (this_l->node->ledger.store.frontier_get (transaction, root));
if (!account.is_zero ())
{
this_l->requeue_pull (rai::pull_info (account, root, root));
}
else if (this_l->node->ledger.store.account_exists (transaction, root))
{
this_l->requeue_pull (rai::pull_info (root, rai::block_hash (0), rai::block_hash (0)));
}
}
}
}))
{
BOOST_LOG (node->log) << boost::str (boost::format ("Resolving fork between our block: %1% and block %2% both with root %3%") % ledger_block->hash ().to_string () % block_a->hash ().to_string () % block_a->root ().to_string ());
node->network.broadcast_confirm_req (ledger_block);
Expand Down

0 comments on commit f69b3ac

Please sign in to comment.