refactoring: remove mapBlockIndex global

in lieu of ::BlockIndex().
This commit is contained in:
James O'Beirne committed 2019-07-08 11:33:13 -04:00
1 parent 55d525ab90
commit 682a1d0f20
6 files changed
+48 -39

No files matched your search

+1 -1
View File
@@ -272,7 +272,7 @@ static int64_t AddTx(CWallet& wallet, uint32_t lockTime, int64_t mockTime, int64
if (blockTime > 0) {
auto locked_chain = wallet.chain().lock();
LockAssertion lock(::cs_main);
auto inserted = mapBlockIndex.emplace(GetRandHash(), new CBlockIndex);
auto inserted = ::BlockIndex().emplace(GetRandHash(), new CBlockIndex);
assert(inserted.second);
const uint256& hash = inserted.first->first;
block = inserted.first->second;