diff options
author | Jacob Evans <jacob@dekz.net> | 2018-02-07 07:09:03 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-02-07 07:16:28 +0800 |
commit | 4be8eca3fe6a81b468776f5413f25ec726e4e752 (patch) | |
tree | fc5b2c561887e1b8b3d34925e89c226c7aadaa5b /packages/subproviders | |
parent | e17ace397cd5d0f4b24d3af868eef8ae55889456 (diff) | |
download | dexon-sol-tools-4be8eca3fe6a81b468776f5413f25ec726e4e752.tar dexon-sol-tools-4be8eca3fe6a81b468776f5413f25ec726e4e752.tar.gz dexon-sol-tools-4be8eca3fe6a81b468776f5413f25ec726e4e752.tar.bz2 dexon-sol-tools-4be8eca3fe6a81b468776f5413f25ec726e4e752.tar.lz dexon-sol-tools-4be8eca3fe6a81b468776f5413f25ec726e4e752.tar.xz dexon-sol-tools-4be8eca3fe6a81b468776f5413f25ec726e4e752.tar.zst dexon-sol-tools-4be8eca3fe6a81b468776f5413f25ec726e4e752.zip |
Attribute the origins of NonceTracker
NonceTrackerSubprovider is inspired from Web3ProviderEngine NonceTracker
Diffstat (limited to 'packages/subproviders')
-rw-r--r-- | packages/subproviders/src/subproviders/nonce_tracker.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/subproviders/src/subproviders/nonce_tracker.ts b/packages/subproviders/src/subproviders/nonce_tracker.ts index 53ee025c9..d967d40f2 100644 --- a/packages/subproviders/src/subproviders/nonce_tracker.ts +++ b/packages/subproviders/src/subproviders/nonce_tracker.ts @@ -12,6 +12,11 @@ import { Subprovider } from './subprovider'; // We do not export this since this is not our error, and we do not throw this error const NONCE_TOO_LOW_ERROR_MESSAGE = 'Transaction nonce is too low'; +/* + This class is heavily inspiried by the Web3ProviderEngine NonceSubprovider + We have added the additional feature of clearing any nonce balues when an error message + describes a nonce value being too low. +*/ export class NonceTrackerSubprovider extends Subprovider { private _nonceCache: { [address: string]: string } = {}; private static _reconstructTransaction(payload: JSONRPCPayload): EthereumTx { |