Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't store context in structs #1714

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions arbnode/inbox_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,16 +491,15 @@ type multiplexerBackend struct {
batches []*SequencerInboxBatch
positionWithinMessage uint64

ctx context.Context
client arbutil.L1Interface
inbox *InboxTracker
}

func (b *multiplexerBackend) PeekSequencerInbox() ([]byte, error) {
func (b *multiplexerBackend) PeekSequencerInbox(ctx context.Context) ([]byte, error) {
if len(b.batches) == 0 {
return nil, errors.New("read past end of specified sequencer batches")
}
return b.batches[0].Serialize(b.ctx, b.client)
return b.batches[0].Serialize(ctx, b.client)
}

func (b *multiplexerBackend) GetSequencerInboxPosition() uint64 {
Expand Down Expand Up @@ -592,7 +591,6 @@ func (t *InboxTracker) AddSequencerBatches(ctx context.Context, client arbutil.L
batches: batches,

inbox: t,
ctx: ctx,
client: client,
}
multiplexer := arbstate.NewInboxMultiplexer(backend, prevbatchmeta.DelayedMessageCount, t.das, arbstate.KeysetValidate)
Expand Down
Loading