From fb38c6e21f064e23b63a46d15adb873029463cff Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Tue, 21 Jun 2022 01:12:07 +0200 Subject: [PATCH] refactor: remove unused methods `{CDBIterator,CCoinsViewDBCursor}::GetValueSize()` These methods haven't been used since the chainstate db cache has been switched from per-tx to per-txout model years ago (PR #10195, commit d342424301013ec47dc146a4beb49d5c9319d80a). --- src/coins.h | 1 - src/dbwrapper.h | 5 ----- src/txdb.cpp | 6 ------ 3 files changed, 12 deletions(-) diff --git a/src/coins.h b/src/coins.h index de297dd427..67fecc9785 100644 --- a/src/coins.h +++ b/src/coins.h @@ -142,7 +142,6 @@ public: virtual bool GetKey(COutPoint &key) const = 0; virtual bool GetValue(Coin &coin) const = 0; - virtual unsigned int GetValueSize() const = 0; virtual bool Valid() const = 0; virtual void Next() = 0; diff --git a/src/dbwrapper.h b/src/dbwrapper.h index 1109cb5888..bcc06e27bd 100644 --- a/src/dbwrapper.h +++ b/src/dbwrapper.h @@ -166,11 +166,6 @@ public: } return true; } - - unsigned int GetValueSize() { - return piter->value().size(); - } - }; class CDBWrapper diff --git a/src/txdb.cpp b/src/txdb.cpp index a0939873ad..c048c2d92a 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -211,7 +211,6 @@ public: bool GetKey(COutPoint &key) const override; bool GetValue(Coin &coin) const override; - unsigned int GetValueSize() const override; bool Valid() const override; void Next() override; @@ -257,11 +256,6 @@ bool CCoinsViewDBCursor::GetValue(Coin &coin) const return pcursor->GetValue(coin); } -unsigned int CCoinsViewDBCursor::GetValueSize() const -{ - return pcursor->GetValueSize(); -} - bool CCoinsViewDBCursor::Valid() const { return keyTmp.first == DB_COIN;