Commit 1f191695 authored by Felipe Andrade's avatar Felipe Andrade

send mutex

parent 7ae98a52
...@@ -34,6 +34,9 @@ func (p *Provider) RoundTrip(ctx context.Context) { ...@@ -34,6 +34,9 @@ func (p *Provider) RoundTrip(ctx context.Context) {
return return
} }
p.txPool.ExclusiveSend.Lock()
defer p.txPool.ExclusiveSend.Unlock()
txHash := common.Hash{} txHash := common.Hash{}
attempt := 0 attempt := 0
nonce := uint64(0) nonce := uint64(0)
......
...@@ -18,6 +18,8 @@ type NetworkTransactionPool struct { ...@@ -18,6 +18,8 @@ type NetworkTransactionPool struct {
// Last time a transaction was sent // Last time a transaction was sent
LastSend time.Time LastSend time.Time
// Prevents concurrent transaction send
ExclusiveSend sync.Mutex
} }
type TransactionState struct { type TransactionState struct {
......
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