Fix default gas limit for fake txs in TraceCollectionSubprovider
This hex string is required to be prefixed with '0x'. If it does not have that prefix, then the call to unmarshalTxData below will fail with: BigNumber Error: new BigNumber() not a number: 5b8d80 This default value is overridden if the incoming call already has a gas estimate, in which case the parse error above does not happen. This is probably why the error wasn't previously noticed.
This commit is contained in:
@@ -186,7 +186,7 @@ export abstract class TraceCollectionSubprovider extends Subprovider {
|
||||
const blockchainLifecycle = new BlockchainLifecycle(this._web3Wrapper);
|
||||
await blockchainLifecycle.startAsync();
|
||||
const fakeTxData = {
|
||||
gas: BLOCK_GAS_LIMIT.toString(16), // tslint:disable-line:custom-no-magic-numbers
|
||||
gas: `0x${BLOCK_GAS_LIMIT.toString(16)}`, // tslint:disable-line:custom-no-magic-numbers
|
||||
isFakeTransaction: true, // This transaction (and only it) is allowed to come through when the lock is locked
|
||||
...callData,
|
||||
from: callData.from || this._defaultFromAddress,
|
||||
|
||||
Reference in New Issue
Block a user