Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 6 additions & 21 deletions execution_chain/db/aristo/aristo_tx_frame.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion vendor/nim-minilru
Loading