op-batcher: Make channel manager safe for concurrent use
Because the batcher is concurrent with respect to sending transactions,
the main loop would fetch transaction data & record transaction status
updates in different go routines. This would lead to concurrent access
of the txChannels map which causes a panic.
This commit adds locks to the public methods for the channel manager
to make it safe for concurrent use.
Co-authored-by:
bnoieh <135800952+bnoieh@users.noreply.github.com>
Showing
Please register or sign in to comment