From c1694ce6bb7e19a8722d5583cd85ad17da40bb67 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Thu, 16 Jan 2020 16:38:30 -0500 Subject: wallet: Avoid use of Chain::Lock in importprunedfunds 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, in which case the "Block not found in chain" error will be stricter and not allow importing data from a blocks between the wallet last processed tip and the current node tip. --- src/interfaces/chain.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/interfaces/chain.h') diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index 3778ab9a8b..7504f4cfb6 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -150,6 +150,12 @@ public: //! or contents. virtual bool findBlock(const uint256& hash, const FoundBlock& block={}) = 0; + //! Return whether block descends from a specified ancestor, and + //! optionally return ancestor information. + virtual bool findAncestorByHash(const uint256& block_hash, + const uint256& ancestor_hash, + const FoundBlock& ancestor_out={}) = 0; + //! Look up unspent output information. Returns coins in the mempool and in //! the current chain UTXO set. Iterates through all the keys in the map and //! populates the values. -- cgit v1.2.3