Move LockAnnotation to make it reflect the truth
This commit is contained in:
parent
cc2588579c
commit
3a809446b3
1 changed files with 1 additions and 1 deletions
|
@ -272,8 +272,8 @@ static int64_t AddTx(CWallet& wallet, uint32_t lockTime, int64_t mockTime, int64
|
||||||
SetMockTime(mockTime);
|
SetMockTime(mockTime);
|
||||||
CBlockIndex* block = nullptr;
|
CBlockIndex* block = nullptr;
|
||||||
if (blockTime > 0) {
|
if (blockTime > 0) {
|
||||||
LockAnnotation lock(::cs_main);
|
|
||||||
auto locked_chain = wallet.chain().lock();
|
auto locked_chain = wallet.chain().lock();
|
||||||
|
LockAnnotation lock(::cs_main);
|
||||||
auto inserted = mapBlockIndex.emplace(GetRandHash(), new CBlockIndex);
|
auto inserted = mapBlockIndex.emplace(GetRandHash(), new CBlockIndex);
|
||||||
assert(inserted.second);
|
assert(inserted.second);
|
||||||
const uint256& hash = inserted.first->first;
|
const uint256& hash = inserted.first->first;
|
||||||
|
|
Loading…
Reference in a new issue