aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-11-23 18:03:11 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-02 15:59:53 +0100
commitfa3942fc4c66d7624bd3578d1e7f4a6a7721c11a (patch)
treed91444c325bbf2f2d6390e8aa6ea7752d3d384e1 /src/validation.h
parent26a1147ce56083d7aa820ac115c16b01e47d911c (diff)
Remove GetSpendHeight
It is unclear what the goal of the helper is, as the caller already knows the spend height before calling the helper. Also, in case the coins view is corrupted, LookupBlockIndex will return nullptr. Dereferencing a nullptr is UB. Fix both issues by removing it. Also, add a sanity check, which aborts if the coins view is corrupted.
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/validation.h b/src/validation.h
index 881438f37a..9385dfdab4 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -478,13 +478,6 @@ public:
//! Returns last CBlockIndex* that is a checkpoint
CBlockIndex* GetLastCheckpoint(const CCheckpointData& data) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
- /**
- * Return the spend height, which is one more than the inputs.GetBestBlock().
- * While checking, GetBestBlock() refers to the parent block. (protected by cs_main)
- * This is also true for mempool checks.
- */
- int GetSpendHeight(const CCoinsViewCache& inputs) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
-
~BlockManager() {
Unload();
}