From 7eddd195218b009ff66ee81aa4543ed7df4b5196 Mon Sep 17 00:00:00 2001 From: Brannon King Date: Tue, 28 May 2019 15:18:50 -0600 Subject: [PATCH] made cache match legacy_master, removed my bad assert in undo --- src/claimtrie.cpp | 2 +- src/claimtrie.h | 2 +- src/validation.cpp | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/claimtrie.cpp b/src/claimtrie.cpp index 328ed62b9..f63db1688 100644 --- a/src/claimtrie.cpp +++ b/src/claimtrie.cpp @@ -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) diff --git a/src/claimtrie.h b/src/claimtrie.h index 65e8fc3e6..63aaa00b4 100644 --- a/src/claimtrie.h +++ b/src/claimtrie.h @@ -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")) diff --git a/src/validation.cpp b/src/validation.cpp index 997d02dd0..470bb85d9 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -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 {