aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-09-08 06:26:29 +0800
committerGitHub <noreply@github.com>2017-09-08 06:26:29 +0800
commit13c7b28d406abcd42511102dc14b022108e0dbe4 (patch)
tree12ecc99fed68c2650963915eb026e6cd3928cc65
parenta27a7e22f2dde983301a2bfb58a6bd7bae985f86 (diff)
parent2117490d41a31eeb2d39383bfc5ae7751f445420 (diff)
downloadtangerine-wallet-browser-13c7b28d406abcd42511102dc14b022108e0dbe4.tar
tangerine-wallet-browser-13c7b28d406abcd42511102dc14b022108e0dbe4.tar.gz
tangerine-wallet-browser-13c7b28d406abcd42511102dc14b022108e0dbe4.tar.bz2
tangerine-wallet-browser-13c7b28d406abcd42511102dc14b022108e0dbe4.tar.lz
tangerine-wallet-browser-13c7b28d406abcd42511102dc14b022108e0dbe4.tar.xz
tangerine-wallet-browser-13c7b28d406abcd42511102dc14b022108e0dbe4.tar.zst
tangerine-wallet-browser-13c7b28d406abcd42511102dc14b022108e0dbe4.zip
Merge pull request #1987 from MetaMask/CheckFaq67
Add test for trying to reproduce faq#67
-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 3312a3bd0..8970cf84d 100644
--- a/test/unit/nonce-tracker-test.js
+++ b/test/unit/nonce-tracker-test.js
@@ -162,6 +162,25 @@ describe('Nonce Tracker', function () {
await nonceLock.releaseLock()
})
})
+
+ describe('Faq issue 67', function () {
+ beforeEach(function () {
+ const txGen = new MockTxGen()
+ const confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 64 })
+ const pendingTxs = txGen.generate({
+ status: 'submitted',
+ }, { count: 10 })
+ // 0x40 is 64 in hex:
+ nonceTracker = generateNonceTrackerWith(pendingTxs, [], '0x40')
+ })
+
+ it('should return nonce after network nonce', async function () {
+ this.timeout(15000)
+ const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926')
+ assert.equal(nonceLock.nextNonce, '74', `nonce should be 74 got ${nonceLock.nextNonce}`)
+ await nonceLock.releaseLock()
+ })
+ })
})
})