Skip to content

Commit 0b690fb

Browse files
PlasmaPowerhkalodner
authored andcommitted
Allow context cancelations for backlogged sequencer txs
1 parent 98754a4 commit 0b690fb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

arbnode/sequencer.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,17 @@ func NewSequencer(txStreamer *TransactionStreamer, l1Client arbutil.L1Interface,
6767

6868
func (s *Sequencer) PublishTransaction(ctx context.Context, tx *types.Transaction) error {
6969
resultChan := make(chan error, 1)
70-
s.txQueue <- txQueueItem{
70+
queueItem := txQueueItem{
7171
tx,
7272
resultChan,
7373
ctx,
7474
}
7575
select {
76+
case s.txQueue <- queueItem:
77+
case <-ctx.Done():
78+
return ctx.Err()
79+
}
80+
select {
7681
case res := <-resultChan:
7782
return res
7883
case <-ctx.Done():

0 commit comments

Comments
 (0)