wallet: Avoid use of Chain::Lock in importmulti

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 it may use a more accurate rescan
time.
This commit is contained in:
Russell Yanofsky
2020-01-16 16:47:00 -05:00
parent 25a9fcf9e5
commit bc96a9bfc6
4 changed files with 2 additions and 19 deletions

View File

@@ -87,13 +87,6 @@ class LockImpl : public Chain::Lock, public UniqueLock<RecursiveMutex>
assert(block != nullptr);
return block->GetBlockTime();
}
int64_t getBlockMedianTimePast(int height) override
{
LockAssertion lock(::cs_main);
CBlockIndex* block = ::ChainActive()[height];
assert(block != nullptr);
return block->GetMedianTimePast();
}
bool haveBlockOnDisk(int height) override
{
LockAssertion lock(::cs_main);