aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/utils
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-06-12 08:04:47 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-06-12 08:07:28 +0800
commit3cc30f91a99578b626d95811a26ee7b19f404455 (patch)
tree11fe1b3e7f57ba6a6e098e8bc22e7570c713d8c3 /packages/contracts/src/utils
parentbc0ae6be318a15bf8670a6da9a59d9bdb12cadae (diff)
downloaddexon-0x-contracts-3cc30f91a99578b626d95811a26ee7b19f404455.tar
dexon-0x-contracts-3cc30f91a99578b626d95811a26ee7b19f404455.tar.gz
dexon-0x-contracts-3cc30f91a99578b626d95811a26ee7b19f404455.tar.bz2
dexon-0x-contracts-3cc30f91a99578b626d95811a26ee7b19f404455.tar.lz
dexon-0x-contracts-3cc30f91a99578b626d95811a26ee7b19f404455.tar.xz
dexon-0x-contracts-3cc30f91a99578b626d95811a26ee7b19f404455.tar.zst
dexon-0x-contracts-3cc30f91a99578b626d95811a26ee7b19f404455.zip
Speedup awaitTransactionMinedAsync and reduce polling interval in contracts tests
Diffstat (limited to 'packages/contracts/src/utils')
-rw-r--r--packages/contracts/src/utils/constants.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/contracts/src/utils/constants.ts b/packages/contracts/src/utils/constants.ts
index af3f26d82..5e336589f 100644
--- a/packages/contracts/src/utils/constants.ts
+++ b/packages/contracts/src/utils/constants.ts
@@ -27,7 +27,10 @@ export const constants = {
ERC20_INSUFFICIENT_BALANCE: 'Insufficient balance to complete transfer.',
ERC20_INSUFFICIENT_ALLOWANCE: 'Insufficient allowance to complete transfer.',
TESTRPC_NETWORK_ID: 50,
- AWAIT_TRANSACTION_MINED_MS: 100,
+ // Note(albrow): In practice V8 and most other engines limit the minimum
+ // interval for setInterval to 10ms. We still set it to 0 here in order to
+ // ensure we always use the minimum interval.
+ AWAIT_TRANSACTION_MINED_MS: 0,
MAX_ETHERTOKEN_WITHDRAW_GAS: 43000,
MAX_TOKEN_TRANSFERFROM_GAS: 80000,
MAX_TOKEN_APPROVE_GAS: 60000,