Skip to content

Commit

Permalink
[doc] GetBestBlock() doesn't do nothing
Browse files Browse the repository at this point in the history
This has tripped people up multiple times because it looks like
GetBestBlock is a const function returning the value of hashBlock.
  • Loading branch information
glozow committed Apr 1, 2021
1 parent b144620 commit 2f8272c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,8 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
}
}

// Bring the best block into scope
// This is const, but calls into the back end CoinsViews. The CCoinsViewDB at the bottom of the
// hierarchy brings the best block into scope. See CCoinsViewDB::GetBestBlock().
m_view.GetBestBlock();

// we have all inputs cached now, so switch back to dummy (to protect
Expand Down

0 comments on commit 2f8272c

Please sign in to comment.