mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-02-03 18:54:38 +00:00
Merge pull request #1963 from sipa/bugfix_nonewblock
Bugfix: don't crash by trying to write unchanged best block
This commit is contained in:
commit
41db7c224a
@ -58,7 +58,8 @@ bool CCoinsViewDB::BatchWrite(const std::map<uint256, CCoins> &mapCoins, CBlockI
|
|||||||
CLevelDBBatch batch;
|
CLevelDBBatch batch;
|
||||||
for (std::map<uint256, CCoins>::const_iterator it = mapCoins.begin(); it != mapCoins.end(); it++)
|
for (std::map<uint256, CCoins>::const_iterator it = mapCoins.begin(); it != mapCoins.end(); it++)
|
||||||
BatchWriteCoins(batch, it->first, it->second);
|
BatchWriteCoins(batch, it->first, it->second);
|
||||||
BatchWriteHashBestChain(batch, pindex->GetBlockHash());
|
if (pindex)
|
||||||
|
BatchWriteHashBestChain(batch, pindex->GetBlockHash());
|
||||||
|
|
||||||
return db.WriteBatch(batch);
|
return db.WriteBatch(batch);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user