Remove rehashing in storage ledger init (#2340)

This looks like a debug leftover, but it causes a state root
recomputation which is slow
This commit is contained in:
Jacek Sieka 2024-06-12 21:13:53 +02:00 committed by GitHub
parent 54f793f946
commit 5f44be1bcd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 6 deletions

View File

@ -174,7 +174,6 @@ proc init*(
T: type StorageLedger;
al: AccountLedger;
account: CoreDbAccount;
reHashOk = true;
): T =
## Storage trie constructor.
##
@ -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: