aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2018-03-29 05:07:56 +0800
committerDan Finlay <dan@danfinlay.com>2018-03-29 05:07:56 +0800
commit47039cc3a94ece44b109d3002b03508f97b82a36 (patch)
treec72a989dbbb60ddf564d8398c94d408f07da9cfb /test
parentb6b18339e2de92afd2fb5364ec5bc4c29b4d10a3 (diff)
downloadtangerine-wallet-browser-47039cc3a94ece44b109d3002b03508f97b82a36.tar
tangerine-wallet-browser-47039cc3a94ece44b109d3002b03508f97b82a36.tar.gz
tangerine-wallet-browser-47039cc3a94ece44b109d3002b03508f97b82a36.tar.bz2
tangerine-wallet-browser-47039cc3a94ece44b109d3002b03508f97b82a36.tar.lz
tangerine-wallet-browser-47039cc3a94ece44b109d3002b03508f97b82a36.tar.xz
tangerine-wallet-browser-47039cc3a94ece44b109d3002b03508f97b82a36.tar.zst
tangerine-wallet-browser-47039cc3a94ece44b109d3002b03508f97b82a36.zip
Add test to reproduce issue behavior
Diffstat (limited to 'test')
-rw-r--r--test/unit/nonce-tracker-test.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js
index 8970cf84d..e17d491f1 100644
--- a/test/unit/nonce-tracker-test.js
+++ b/test/unit/nonce-tracker-test.js
@@ -33,6 +33,25 @@ describe('Nonce Tracker', function () {
})
})
+ describe.only('issue 3670', function () {
+ beforeEach(function () {
+ const txGen = new MockTxGen()
+ pendingTxs = txGen.generate({ status: 'submitted' }, {
+ fromNonce: 6,
+ count: 3,
+ })
+ nonceTracker = generateNonceTrackerWith(pendingTxs, [], '0x6')
+ })
+
+ it('should return 9', async function () {
+ this.timeout(15000)
+ const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926')
+ console.log(JSON.stringify(nonceLock, null, 2))
+ assert.equal(nonceLock.nextNonce, '9', `nonce should be 9 got ${nonceLock.nextNonce}`)
+ await nonceLock.releaseLock()
+ })
+ })
+
describe('with no previous txs', function () {
beforeEach(function () {
nonceTracker = generateNonceTrackerWith([], [])