Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Allow specifiying the gas limit when instantiating a Web3 provider.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Casey committed Mar 9, 2016
1 parent 200c25a commit 705b6ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/blockchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Blockchain = function(logger, options) {
this.blockLogs = {};
this.coinbase = null;
this.contracts = {};
this.gasLimit = options.gasLimit || '0x2fefd8';
this.blockHashes = {};
this.transactions = {};
this.latest_filter_id = 1;
Expand Down Expand Up @@ -92,7 +93,7 @@ Blockchain.prototype.createBlock = function() {
var block = new Block();
var parent = this.blocks.length != 0 ? this.blocks[this.blocks.length - 1] : null;

block.header.gasLimit = '0x2fefd8';
block.header.gasLimit = this.gasLimit;

// Ensure we have the right block number for the VM.
block.header.number = this.toHex(this.blocks.length);
Expand Down

0 comments on commit 705b6ac

Please sign in to comment.