fix bug
This commit is contained in:
parent
70e91932e9
commit
09cd9ec49a
|
@ -73,13 +73,15 @@
|
||||||
DefaultBlockParameterName/LATEST)
|
DefaultBlockParameterName/LATEST)
|
||||||
sendAsync
|
sendAsync
|
||||||
get
|
get
|
||||||
getTransactionCount)]
|
getTransactionCount)
|
||||||
|
nonce (if (contains? nonces web3j-tx-count)
|
||||||
|
(inc (max nonces))
|
||||||
|
web3j-tx-count)]
|
||||||
;; TODO this is a memory leak since tracking state is never pruned
|
;; TODO this is a memory leak since tracking state is never pruned
|
||||||
;; Since we're not doing 1000s of transactions every day yet we can
|
;; Since we're not doing 1000s of transactions every day yet we can
|
||||||
;; probably defer worrying about this until a bit later
|
;; probably defer worrying about this until a bit later
|
||||||
(if (contains? nonces web3j-tx-count)
|
(swap! state assoc internal-tx-id nonce)
|
||||||
(swap! state assoc internal-tx-id (inc (max nonces)))
|
nonce))))
|
||||||
(swap! state assoc internal-tx-id web3j-tx-count))))))
|
|
||||||
|
|
||||||
(def nonce-tracker
|
(def nonce-tracker
|
||||||
(->NonceTracker (atom {})))
|
(->NonceTracker (atom {})))
|
||||||
|
|
Loading…
Reference in New Issue