pass deleted code to collector (#718)

This commit is contained in:
Alex Sharov 2020-07-07 09:33:26 +07:00 committed by GitHub
parent d3ede58ff0
commit 8363cb0535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -314,8 +314,8 @@ func getCodeUnwindExtractFunc(db ethdb.Getter) etl.ExtractFunc {
newK := dbutils.PlainGenerateStoragePrefix(k, a.Incarnation)
var codeHash []byte
codeHash, err = db.Get(dbutils.PlainContractCodeBucket, newK)
if err != nil {
return err
if err != nil && !errors.Is(err, ethdb.ErrKeyNotFound) {
return fmt.Errorf("getCodeUnwindExtractFunc: %w, key=%x", err, newK)
}
return next(k, newK, codeHash)
})