diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2020-01-22 17:15:17 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2020-03-31 08:36:02 -0500 |
commit | 48973402d8bccb673eaeb68b7aa86faa39d3cb8a (patch) | |
tree | 307622d91c87c8b1cd79d8e66ac5522d638420d7 /src/interfaces | |
parent | e958ff9ab5607da2cd321f29fc785a6d359e44f4 (diff) | |
download | bitcoin-48973402d8bccb673eaeb68b7aa86faa39d3cb8a.tar.xz |
wallet: Avoid use of Chain::Lock in CWallet::GetKeyBirthTimes
This is a step toward removing the Chain::Lock class and reducing cs_main
locking.
This change only affects behavior in the case where wallet last block processed
falls behind the chain tip, where it will treat the last block processed as the
current tip.
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/chain.cpp | 7 | ||||
-rw-r--r-- | src/interfaces/chain.h | 3 |
2 files changed, 0 insertions, 10 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp index 2b2d3a4b86..c8311b2986 100644 --- a/src/interfaces/chain.cpp +++ b/src/interfaces/chain.cpp @@ -80,13 +80,6 @@ class LockImpl : public Chain::Lock, public UniqueLock<RecursiveMutex> assert(block != nullptr); return block->GetBlockHash(); } - int64_t getBlockTime(int height) override - { - LockAssertion lock(::cs_main); - CBlockIndex* block = ::ChainActive()[height]; - assert(block != nullptr); - return block->GetBlockTime(); - } bool haveBlockOnDisk(int height) override { LockAssertion lock(::cs_main); diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index ef5a002f54..a2d381b5c6 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -100,9 +100,6 @@ public: //! Get block hash. Height must be valid or this function will abort. virtual uint256 getBlockHash(int height) = 0; - //! Get block time. Height must be valid or this function will abort. - virtual int64_t getBlockTime(int height) = 0; - //! Check that the block is available on disk (i.e. has not been //! pruned), and contains transactions. virtual bool haveBlockOnDisk(int height) = 0; |