Skip to content

Commit

Permalink
Remove rehashing in storage ledger init
Browse files Browse the repository at this point in the history
This looks like a debug leftover, but it causes a state root
recomputation which is slow
  • Loading branch information
arnetheduck committed Jun 12, 2024
1 parent 54f793f commit 3c27f70
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions nimbus/db/ledger/distinct_ledgers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ proc init*(
T: type StorageLedger;
al: AccountLedger;
account: CoreDbAccount;
reHashOk = true;
): T =
## Storage trie constructor.
##
Expand All @@ -183,11 +182,6 @@ proc init*(
let
db = al.distinctBase.parent
stt = account.storage
if not stt.isNil and reHashOk:
let rc = al.distinctBase.getColumn.state()
if rc.isErr:
raiseAssert "re-hash oops, error=" & $$rc.error
let
ctx = db.ctx
trie = if stt.isNil: ctx.newColumn(account.address) else: stt
mpt = block:
Expand Down

0 comments on commit 3c27f70

Please sign in to comment.