Skip to content

Commit

Permalink
🎨 Update default value for blockHeaderTimeout to 10 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Sep 17, 2021
1 parent 1a350a4 commit fe1c8a4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/web3-eth-contract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ The ``blockHeaderTimeout`` is used over socket-based connections. This option de
Returns
-------

``number``: The current value of blockHeaderTimeout (default: 5 seconds)
``number``: The current value of blockHeaderTimeout (default: 10 seconds)

------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/web3-eth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ The ``blockHeaderTimeout`` is used over socket-based connections. This option de
Returns
-------

``number``: The current value of blockHeaderTimeout (default: 5 seconds)
``number``: The current value of blockHeaderTimeout (default: 10 seconds)

-------
Example
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-core-method/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var Method = function Method(options) {
this.transactionBlockTimeout = options.transactionBlockTimeout || 50;
this.transactionConfirmationBlocks = options.transactionConfirmationBlocks || 24;
this.transactionPollingTimeout = options.transactionPollingTimeout || 750;
this.blockHeaderTimeout = options.blockHeaderTimeout || 5; // 5 seconds
this.blockHeaderTimeout = options.blockHeaderTimeout || 10; // 10 seconds
this.defaultCommon = options.defaultCommon;
this.defaultChain = options.defaultChain;
this.defaultHardfork = options.defaultHardfork;
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-eth/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ var Eth = function Eth() {
var transactionBlockTimeout = 50;
var transactionConfirmationBlocks = 24;
var transactionPollingTimeout = 750;
var blockHeaderTimeout = 5;
var blockHeaderTimeout = 10; // 10 seconds
var maxListenersWarningThreshold = 100;
var defaultChain, defaultHardfork, defaultCommon;

Expand Down
6 changes: 3 additions & 3 deletions test/eth.blockHeaderTimeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ var setValue = 123;
describe('web3.eth', function () {
describe('blockHeaderTimeout', function () {
it('should check if blockHeaderTimeout is set to proper value', function () {
assert.equal(eth.blockHeaderTimeout, 5);
assert.equal(eth.Contract.blockHeaderTimeout, 5);
assert.equal(eth.getCode.method.blockHeaderTimeout, 5);
assert.equal(eth.blockHeaderTimeout, 10);
assert.equal(eth.Contract.blockHeaderTimeout, 10);
assert.equal(eth.getCode.method.blockHeaderTimeout, 10);
});
it('should set blockHeaderTimeout for all sub packages is set to proper value, if Eth package is changed', function () {
eth.blockHeaderTimeout = setValue;
Expand Down

0 comments on commit fe1c8a4

Please sign in to comment.