diff --git a/op-ufm/op-ufm/pkg/provider/roundtrip.go b/op-ufm/op-ufm/pkg/provider/roundtrip.go index 7cd12aa..42b5659 100644 --- a/op-ufm/op-ufm/pkg/provider/roundtrip.go +++ b/op-ufm/op-ufm/pkg/provider/roundtrip.go @@ -34,6 +34,9 @@ func (p *Provider) RoundTrip(ctx context.Context) { return } + p.txPool.ExclusiveSend.Lock() + defer p.txPool.ExclusiveSend.Unlock() + txHash := common.Hash{} attempt := 0 nonce := uint64(0) diff --git a/op-ufm/op-ufm/pkg/provider/tx_pool.go b/op-ufm/op-ufm/pkg/provider/tx_pool.go index ffdd214..2ea5f6a 100644 --- a/op-ufm/op-ufm/pkg/provider/tx_pool.go +++ b/op-ufm/op-ufm/pkg/provider/tx_pool.go @@ -18,6 +18,8 @@ type NetworkTransactionPool struct { // Last time a transaction was sent LastSend time.Time + // Prevents concurrent transaction send + ExclusiveSend sync.Mutex } type TransactionState struct {