Skip to content

Commit 5cf48e3

Browse files
committed
Improve comment around locking on fetchSigningAccountKey()
1 parent f9b4b1e commit 5cf48e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

services/requester/single_tx_pool.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,9 @@ func (t *SingleTxPool) buildTransaction(
200200
}
201201

202202
func (t *SingleTxPool) fetchSigningAccountKey() (*keystore.AccountKey, error) {
203-
// building and signing transactions should be
204-
// blocking, so we don't have conflicts with keys.
203+
// getting an account key from the `KeyStore` for signing transactions,
204+
// should be lock-protected, so that we don't sign any two Flow
205+
// transactions with the same account key
205206
t.mux.Lock()
206207
defer t.mux.Unlock()
207208

0 commit comments

Comments
 (0)