aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorgzhao408 <gzhao408@berkeley.edu>2021-02-01 15:24:30 -0800
committerglozow <gzhao408@berkeley.edu>2021-04-01 08:33:11 -0700
commit2f8272c2a4b6fa84c04dfeb4d751bb218f2d4c78 (patch)
tree40939cf5867b771361109e7b54a2975d47447065 /src/validation.cpp
parentb14462083f82aeaa9a376978f210db5538db296f (diff)
[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.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index d1b9efe7ba..7f1238f795 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -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