Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
remove dead code, move and refactor comments
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmurdoch committed Jul 15, 2019
1 parent bffbe01 commit a7f17c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/blockchain_double.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ BlockchainDouble.prototype.readyCall = function(tx, blockNumber, callback) {

newBlock.transactions.push(tx);

// gas estimates and eth_calls shouldn't be subject to block gas limits
// gas estimates and eth_calls aren't subject to block gas limits
newBlock.header.gasLimit = tx.gasLimit;

const runArgs = {
Expand Down
4 changes: 1 addition & 3 deletions lib/subproviders/geth_api_double.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,17 +338,15 @@ GethApiDouble.prototype.eth_sendRawTransaction = function(rawTx, callback) {
GethApiDouble.prototype._setCallGasLimit = function(txData) {
// if the caller didn't specify a gas limit make sure we set one
if (!txData.gas && !txData.gasLimit) {
// if the user configured a global `callGasLimit`
// use it
const globalCallGasLimit = this.options.callGasLimit;
if (globalCallGasLimit != null) {
// if the user configured a global `callGasLimit` use it
txData.gas = globalCallGasLimit;
} else {
// otherwise, set a very high gas limit. We'd use Infinity, or some VM flag to ignore gasLimit checks like
// geth does, but the VM doesn't currently support that for `runTx`.
// https://github.com/ethereumjs/ethereumjs-vm/blob/4bbb6e394a344717890d618a6be1cf67b8e5b74d/lib/runTx.ts#L71
txData.gas = maxUInt64;
// txData.gas = this.state.blockchain.blockGasLimit;
}
}
};
Expand Down

0 comments on commit a7f17c5

Please sign in to comment.