Skip to content

Commit

Permalink
sync nonce concurrency (smartcontractkit#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnieeG authored Feb 27, 2023
1 parent df99c72 commit d9ab9cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blockchain/ethereum.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func newEVMClient(networkSettings EVMNetwork) (EVMClient, error) {
// it ensures the instance of EthereumClient is synced with passed EVMClient's nonce updates.
func (e *EthereumClient) SyncNonce(c EVMClient) {
n := c.GetNonceSetting()
n.NonceMu.Lock()
defer n.NonceMu.Unlock()
e.NonceSettings.NonceMu = n.NonceMu
e.NonceSettings.Nonces = n.Nonces
}
Expand Down

0 comments on commit d9ab9cf

Please sign in to comment.