wallet refactor: Avoid use of Chain::Lock in CWallet::RescanFromTime

This is a step toward removing the Chain::Lock class and reducing cs_main
locking.

This change has no effect on behavior.
This commit is contained in:
Russell Yanofsky
2020-01-21 15:55:19 -05:00
parent f7ba881bc6
commit 3cb85ac594
4 changed files with 27 additions and 7 deletions

View File

@@ -260,6 +260,11 @@ public:
WAIT_LOCK(cs_main, lock);
return FillBlock(LookupBlockIndex(hash), block, lock);
}
bool findFirstBlockWithTimeAndHeight(int64_t min_time, int min_height, const FoundBlock& block) override
{
WAIT_LOCK(cs_main, lock);
return FillBlock(ChainActive().FindEarliestAtLeast(min_time, min_height), block, lock);
}
bool findAncestorByHeight(const uint256& block_hash, int ancestor_height, const FoundBlock& ancestor_out) override
{
WAIT_LOCK(cs_main, lock);