aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/nonce-tracker.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-07-27 01:40:08 +0800
committerkumavis <aaron@kumavis.me>2017-07-27 01:40:08 +0800
commit0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5 (patch)
treefaee83d259fa3e3dfd8c8dfe52a9cc218f58b93f /app/scripts/lib/nonce-tracker.js
parent39d28922de31fa26b50eca5c7719ae9feefae770 (diff)
downloadtangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar
tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar.gz
tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar.bz2
tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar.lz
tangerine-wallet-browser-0ef90fb1f0f1a1bf4a7efd90df7b8f8c66fc07d5.tar.xz
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/nonce-tracker.js')
-rw-r--r--app/scripts/lib/nonce-tracker.js7
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 () {