Noop in AccountsLedger.getCode if the codehash is EMPTY_CODE_HASH (#2229)

This commit is contained in:
andri lim 2024-05-27 15:26:26 +07:00 committed by GitHub
parent 5db6ee07fb
commit eb50dcc2f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -401,7 +401,7 @@ proc getCode*(ac: AccountsLedgerRef, address: EthAddress): seq[byte] =
if CodeLoaded in acc.flags or CodeChanged in acc.flags:
result = acc.code
else:
elif acc.statement.codeHash != EMPTY_CODE_HASH:
let rc = ac.kvt.get(contractHashKey(acc.statement.codeHash).toOpenArray)
if rc.isErr:
warn logTxt "getCode()", codeHash=acc.statement.codeHash, error=($$rc.error)