made cache match legacy_master, removed my bad assert in undo

This commit is contained in:
Brannon King 2019-05-28 15:18:50 -06:00
parent 9cb4064adb
commit 7eddd19521
3 changed files with 2 additions and 3 deletions

View file

@ -946,7 +946,7 @@ bool CClaimTrie::WriteToDisk()
dirtySupportExpirationQueueRows.clear();
batch.Write(HASH_BLOCK, hashBlock);
batch.Write(CURRENT_HEIGHT, nCurrentHeight);
return db.WriteBatch(batch);
return db.WriteBatch(batch, true);
}
bool CClaimTrie::InsertFromDisk(const std::string& name, CClaimTrieNode* node)

View file

@ -359,7 +359,7 @@ class CClaimTrie
{
public:
CClaimTrie(bool fMemory = false, bool fWipe = false, int nProportionalDelayFactor = 32)
: db(GetDataDir() / "claimtrie", 100, fMemory, fWipe, false)
: db(GetDataDir() / "claimtrie", 20 * 1024 * 1024, fMemory, fWipe, false)
, nCurrentHeight(0), nExpirationTime(Params().GetConsensus().nOriginalClaimExpirationTime)
, nProportionalDelayFactor(nProportionalDelayFactor)
, root(uint256S("0000000000000000000000000000000000000000000000000000000000000001"))

View file

@ -1452,7 +1452,6 @@ int ApplyTxInUndo(unsigned int index, CTxUndo& txUndo, CCoinsViewCache& view, CC
// outputs. This implies that it must be present for some other output of the same tx.
const Coin& alternate = AccessByTxid(view, out.hash);
if (!alternate.IsSpent()) {
assert(!undo.fIsClaim);
undo.nHeight = alternate.nHeight;
undo.fCoinBase = alternate.fCoinBase;
} else {