Skip to content

Commit

Permalink
Call UnwindTo with tx instead of nil in sync_test.go (#11133)
Browse files Browse the repository at this point in the history
Co-authored-by: antonis19 <antonis19@users.noreply.github.com>
  • Loading branch information
antonis19 and antonis19 authored Jul 13, 2024
1 parent 6bb5d8b commit 9890a94
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions eth/stagedsync/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func TestUnwindSomeStagesBehindUnwindPoint(t *testing.T) {
flow = append(flow, stages.Senders)
if !unwound {
unwound = true
_ = u.UnwindTo(1500, UnwindReason{}, nil)
_ = u.UnwindTo(1500, UnwindReason{}, txc.Tx)
return nil
}
return nil
Expand Down Expand Up @@ -289,7 +289,7 @@ func TestUnwind(t *testing.T) {
flow = append(flow, stages.Senders)
if !unwound {
unwound = true
_ = u.UnwindTo(500, UnwindReason{}, nil)
_ = u.UnwindTo(500, UnwindReason{}, txc.Tx)
return s.Update(txc.Tx, 3000)
}
return nil
Expand Down Expand Up @@ -343,7 +343,7 @@ func TestUnwind(t *testing.T) {
//check that at unwind disabled stage not appear
flow = flow[:0]
state.unwindOrder = []*Stage{s[3], s[2], s[1], s[0]}
_ = state.UnwindTo(100, UnwindReason{}, nil)
_ = state.UnwindTo(100, UnwindReason{}, tx)
_, err = state.Run(db, wrap.TxContainer{Tx: tx}, true /* initialCycle */, false)
assert.NoError(t, err)

Expand Down Expand Up @@ -393,7 +393,7 @@ func TestUnwindEmptyUnwinder(t *testing.T) {
flow = append(flow, stages.Senders)
if !unwound {
unwound = true
_ = u.UnwindTo(500, UnwindReason{}, nil)
_ = u.UnwindTo(500, UnwindReason{}, txc.Tx)
return s.Update(txc.Tx, 3000)
}
return nil
Expand Down Expand Up @@ -581,7 +581,7 @@ func TestSyncInterruptLongUnwind(t *testing.T) {
flow = append(flow, stages.Senders)
if !unwound {
unwound = true
_ = u.UnwindTo(500, UnwindReason{}, nil)
_ = u.UnwindTo(500, UnwindReason{}, txc.Tx)
return s.Update(txc.Tx, 3000)
}
return nil
Expand Down

0 comments on commit 9890a94

Please sign in to comment.