From ba35b31f515f78ede0230bc8b3539f39023701f2 Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Wed, 2 Feb 2022 15:24:06 +0700 Subject: [PATCH] Snapshot: fix empty sender (#3405) * save * save * save * save --- turbo/snapshotsync/block_snapshots.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/turbo/snapshotsync/block_snapshots.go b/turbo/snapshotsync/block_snapshots.go index da717420d..064045385 100644 --- a/turbo/snapshotsync/block_snapshots.go +++ b/turbo/snapshotsync/block_snapshots.go @@ -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[:]...)