Warn not error when body is missing (#4309)

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
This commit is contained in:
ledgerwatch 2022-05-30 16:23:57 +01:00 committed by GitHub
parent e0323e7434
commit 85814cacc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1073,7 +1073,8 @@ func DumpTxs(ctx context.Context, db kv.RoDB, segmentFile, tmpDir string, blockF
h := common.BytesToHash(v) h := common.BytesToHash(v)
dataRLP := rawdb.ReadStorageBodyRLP(tx, h, blockNum) dataRLP := rawdb.ReadStorageBodyRLP(tx, h, blockNum)
if dataRLP == nil { if dataRLP == nil {
return false, fmt.Errorf("body not found: %d, %x", blockNum, h) log.Debug("DumpTxs block body not found", "height", blockNum, "hash", h)
return true, nil
} }
var body types.BodyForStorage var body types.BodyForStorage
if e := rlp.DecodeBytes(dataRLP, &body); e != nil { if e := rlp.DecodeBytes(dataRLP, &body); e != nil {