Skip to content

Commit 2f8272c

Browse files
committed
[doc] GetBestBlock() doesn't do nothing
This has tripped people up multiple times because it looks like GetBestBlock is a const function returning the value of hashBlock.
1 parent b144620 commit 2f8272c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/validation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,8 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
690690
}
691691
}
692692

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

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

0 commit comments

Comments
 (0)