Browse Source

Bugfix: don't crash by trying to write unchanged best block

miguelfreitas
Pieter Wuille 12 years ago
parent
commit
0b297a614f
  1. 1
      src/txdb.cpp

1
src/txdb.cpp

@ -58,6 +58,7 @@ bool CCoinsViewDB::BatchWrite(const std::map<uint256, CCoins> &mapCoins, CBlockI @@ -58,6 +58,7 @@ bool CCoinsViewDB::BatchWrite(const std::map<uint256, CCoins> &mapCoins, CBlockI
CLevelDBBatch batch;
for (std::map<uint256, CCoins>::const_iterator it = mapCoins.begin(); it != mapCoins.end(); it++)
BatchWriteCoins(batch, it->first, it->second);
if (pindex)
BatchWriteHashBestChain(batch, pindex->GetBlockHash());
return db.WriteBatch(batch);

Loading…
Cancel
Save