diff options
Increment tx ids to avoid collisions
Fixes #791
It was possible for two requests to have the same ID, causing a crash and loss of StreamProvider connection.
This new id generation strategy creates a random ID, and increments it for each request.
In case the id generator is included from two different processes, I'm initializing the counter at a random number, and rolling it over a large number when it gets too big.
Diffstat (limited to 'app/scripts/lib/idStore.js')
-rw-r--r-- | app/scripts/lib/idStore.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index 65b8c7029..ccd5efe69 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -7,7 +7,7 @@ const EthQuery = require('eth-query') const KeyStore = require('eth-lightwallet').keystore const clone = require('clone') const extend = require('xtend') -const createId = require('web3-provider-engine/util/random-id') +const createId = require('./random-id') const ethBinToOps = require('eth-bin-to-ops') const autoFaucet = require('./auto-faucet') const messageManager = require('./message-manager') |