diff --git a/execution_chain/db/aristo/aristo_tx_frame.nim b/execution_chain/db/aristo/aristo_tx_frame.nim index b445829ced..b8e8e73f1a 100644 --- a/execution_chain/db/aristo/aristo_tx_frame.nim +++ b/execution_chain/db/aristo/aristo_tx_frame.nim @@ -210,33 +210,18 @@ with --debug-eager-state-root.""" # really run after things have been written (to maintain sync betweeen # in-memory and on-disk state) - # Copy back updated payloads into the shared database LRU caches. + # Updated values in the txFrame caches are now stale so remove them from the + # shared database LRU caches. - # Copy cached values from the snapshot for accPath, v in txFrame.snapshot.acc: - if v[0] == nil: - db.accLeaves.del(accPath) - else: - discard db.accLeaves.update(accPath, v[0]) - + discard db.accLeaves.refresh(accPath, v[0]) for mixPath, v in txFrame.snapshot.sto: - if v[0] == nil: - db.stoLeaves.del(mixPath) - else: - discard db.stoLeaves.update(mixPath, v[0]) + discard db.stoLeaves.refresh(mixPath, v[0]) - # Copy cached values from the txFrame for accPath, vtx in txFrame.accLeaves: - if vtx == nil: - db.accLeaves.del(accPath) - else: - discard db.accLeaves.update(accPath, vtx) - + discard db.accLeaves.refresh(accPath, vtx) for mixPath, vtx in txFrame.stoLeaves: - if vtx == nil: - db.stoLeaves.del(mixPath) - else: - discard db.stoLeaves.update(mixPath, vtx) + discard db.stoLeaves.refresh(mixPath, vtx) txFrame.snapshot.vtx.clear() txFrame.snapshot.acc.clear() diff --git a/vendor/nim-minilru b/vendor/nim-minilru index 0c4b2bce95..aba86fcf59 160000 --- a/vendor/nim-minilru +++ b/vendor/nim-minilru @@ -1 +1 @@ -Subproject commit 0c4b2bce959591f0a862e9b541ba43c6d0cf3476 +Subproject commit aba86fcf59597f5d43875751d478732100456d1f