diff options
author | kumavis <aaron@kumavis.me> | 2017-07-27 01:40:08 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2017-07-27 01:40:08 +0800 |
commit | 0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5 (patch) | |
tree | faee83d259fa3e3dfd8c8dfe52a9cc218f58b93f /app/scripts/lib | |
parent | 39d28922de31fa26b50eca5c7719ae9feefae770 (diff) | |
download | tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar.gz tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar.zst tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.zip |
tx controller + nonce tracker - record nonce components on txMeta
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/nonce-tracker.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/scripts/lib/nonce-tracker.js b/app/scripts/lib/nonce-tracker.js index 81b500550..c0746bd87 100644 --- a/app/scripts/lib/nonce-tracker.js +++ b/app/scripts/lib/nonce-tracker.js @@ -37,8 +37,11 @@ class NonceTracker { assert(Number.isInteger(baseCount), `nonce-tracker - baseCount is not an integer - got: (${typeof baseCount}) "${baseCount}"`) const nextNonce = baseCount + pendingCount assert(Number.isInteger(nextNonce), `nonce-tracker - nextNonce is not an integer - got: (${typeof nextNonce}) "${nextNonce}"`) - // return next nonce and release cb - return { nextNonce, releaseLock } + // collect the numbers used to calculate the nonce for debugging + const blockNumber = currentBlock.number + const nonceDetails = { blockNumber, baseCount, pendingCount } + // return nonce and release cb + return { nextNonce, nonceDetails, releaseLock } } async _getCurrentBlock () { |