Snapshot: fix empty sender (#3405)

* save

* save

* save

* save
This commit is contained in:
Alex Sharov 2022-02-02 15:24:06 +07:00 committed by GitHub
parent 68f1b52b1f
commit ba35b31f51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -608,16 +608,15 @@ func DumpTxs(ctx context.Context, db kv.RoDB, segmentFile, tmpDir string, blockF
panic(fmt.Sprintf("no gaps in tx ids are allowed: block %d does jump from %d to %d", blockNum, prevTxID, id))
}
prevTxID = id
if len(senders) > 0 {
parseCtx.WithSender(true)
}
if _, err := parseCtx.ParseTransaction(tv, 0, &slot, sender[:], true /* hasEnvelope */); err != nil {
parseCtx.WithSender(len(senders) == 0)
if _, err := parseCtx.ParseTransaction(tv, 0, &slot, sender[:], false /* hasEnvelope */); err != nil {
return err
}
fmt.Printf("sender: %d, %d, %x\n", blockNum, len(senders), sender)
if len(senders) > 0 {
sender = senders[j]
}
_ = sender
valueBuf = valueBuf[:0]
valueBuf = append(valueBuf, slot.IdHash[:1]...)
valueBuf = append(valueBuf, sender[:]...)