TxLookup: don't fail if body not found

This commit is contained in:
alex.sharov 2023-09-12 11:02:28 +07:00
parent cc343ceda2
commit 13f782cef7

View File

@ -121,8 +121,9 @@ func txnLookupTransform(logPrefix string, tx kv.RwTx, blockFrom, blockTo uint64,
if err != nil {
return err
}
if body == nil {
return fmt.Errorf("transform: empty block body %d, hash %x", blocknum, v)
if body == nil { // tolerate such an error, because likely it's corner-case - and not critical one
log.Warn(fmt.Sprintf("[%s] transform: empty block body %d, hash %x", logPrefix, blocknum, v))
return nil
}
blockNumBytes := bigNum.SetUint64(blocknum).Bytes()