aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/chain.h
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2020-01-21 17:08:12 -0500
committerRussell Yanofsky <russ@yanofsky.org>2020-03-31 08:36:02 -0500
commit1be8ff280c78c30baabae9429c53c0bebb89c44d (patch)
treee028b55f2c2821390f9e913be5d5fb1c3516f5a9 /src/interfaces/chain.h
parent3cb85ac594f115db99f96b0a0f4bfdcd69ef0590 (diff)
downloadbitcoin-1be8ff280c78c30baabae9429c53c0bebb89c44d.tar.xz
wallet: Avoid use of Chain::Lock in rescanblockchain
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. The rescanblockchain error height error checking will just be stricter in this case and only accept values up to the last processed height
Diffstat (limited to 'src/interfaces/chain.h')
-rw-r--r--src/interfaces/chain.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h
index 16753b7cc1..8bc0ed824c 100644
--- a/src/interfaces/chain.h
+++ b/src/interfaces/chain.h
@@ -114,10 +114,6 @@ public:
//! (to avoid the cost of a second lookup in case this information is needed.)
virtual Optional<int> findFirstBlockWithTimeAndHeight(int64_t time, int height, uint256* hash) = 0;
- //! Return height of last block in the specified range which is pruned, or
- //! nullopt if no block in the range is pruned. Range is inclusive.
- virtual Optional<int> findPruned(int start_height = 0, Optional<int> stop_height = nullopt) = 0;
-
//! Return height of the specified block if it is on the chain, otherwise
//! return the height of the highest block on chain that's an ancestor
//! of the specified block, or nullopt if there is no common ancestor.
@@ -179,6 +175,11 @@ public:
//! the specified block hash are verified.
virtual double guessVerificationProgress(const uint256& block_hash) = 0;
+ //! Return true if data is available for all blocks in the specified range
+ //! of blocks. This checks all blocks that are ancestors of block_hash in
+ //! the height range from min_height to max_height, inclusive.
+ virtual bool hasBlocks(const uint256& block_hash, int min_height = 0, Optional<int> max_height = {}) = 0;
+
//! Check if transaction is RBF opt in.
virtual RBFTransactionState isRBFOptIn(const CTransaction& tx) = 0;