Noop in AccountsLedger.getCode if the codehash is EMPTY_CODE_HASH (#2229)
This commit is contained in:
parent
5db6ee07fb
commit
eb50dcc2f9
|
@ -401,7 +401,7 @@ proc getCode*(ac: AccountsLedgerRef, address: EthAddress): seq[byte] =
|
||||||
|
|
||||||
if CodeLoaded in acc.flags or CodeChanged in acc.flags:
|
if CodeLoaded in acc.flags or CodeChanged in acc.flags:
|
||||||
result = acc.code
|
result = acc.code
|
||||||
else:
|
elif acc.statement.codeHash != EMPTY_CODE_HASH:
|
||||||
let rc = ac.kvt.get(contractHashKey(acc.statement.codeHash).toOpenArray)
|
let rc = ac.kvt.get(contractHashKey(acc.statement.codeHash).toOpenArray)
|
||||||
if rc.isErr:
|
if rc.isErr:
|
||||||
warn logTxt "getCode()", codeHash=acc.statement.codeHash, error=($$rc.error)
|
warn logTxt "getCode()", codeHash=acc.statement.codeHash, error=($$rc.error)
|
||||||
|
|
Loading…
Reference in New Issue