Skip to content

Commit

Permalink
move mutex locking
Browse files Browse the repository at this point in the history
  • Loading branch information
freigeistig committed Mar 9, 2024
1 parent 46bbfd0 commit 62662dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/service/api/handlers/verify_proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ func VerifyProof(w http.ResponseWriter, r *http.Request) {
return
}

NetworkConfig(r).LockNonce()
defer NetworkConfig(r).UnlockNonce()

gas, err := EthClient(r).EstimateGas(r.Context(), ethereum.CallMsg{
From: crypto.PubkeyToAddress(NetworkConfig(r).PrivateKey.PublicKey),
To: &registration,
Expand All @@ -97,9 +100,6 @@ func VerifyProof(w http.ResponseWriter, r *http.Request) {
return
}

NetworkConfig(r).LockNonce()
defer NetworkConfig(r).UnlockNonce()

tx, err := types.SignNewTx(
NetworkConfig(r).PrivateKey,
types.NewCancunSigner(NetworkConfig(r).ChainID),
Expand Down

0 comments on commit 62662dc

Please sign in to comment.