Commit 8366317b authored by Michael de Hoog's avatar Michael de Hoog

Remove unncessary defer

parent 3a35b74e
...@@ -313,14 +313,12 @@ func (l *BatchSubmitter) drainState(receiptsCh chan txmgr.TxReceipt[txData], que ...@@ -313,14 +313,12 @@ func (l *BatchSubmitter) drainState(receiptsCh chan txmgr.TxReceipt[txData], que
txDone := make(chan struct{}) txDone := make(chan struct{})
go func() { go func() {
defer func() {
// wait for all transactions to complete
queue.Wait()
close(txDone)
}()
// publish remaining state // publish remaining state
l.publishStateToL1(l.killCtx, queue, receiptsCh) l.publishStateToL1(l.killCtx, queue, receiptsCh)
// wait for all transactions to complete
queue.Wait()
// notify that we're done
close(txDone)
}() }()
// drain and handle the remaining receipts // drain and handle the remaining receipts
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment