-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add: custom transaction polling interval (#4584) * add: custom transaction polling interval allow to set via options the interval which polls for TX status * add: transactionPollingInterval to contract * add: pass transactionPollingInterval to method * Update CHANGELOG.md * add: transactionPollingInterval docs Co-authored-by: Nazar Hussain <nazarhussain@gmail.com> * Add transactionPollingInterval to web3-eth * Init transactionPollingInterval tests * Update docs/web3-eth.rst Co-authored-by: jdevcs <86780488+jdevcs@users.noreply.github.com> * Update docs/web3-eth-contract.rst Co-authored-by: jdevcs <86780488+jdevcs@users.noreply.github.com> * Move 4672 change to 1.7.1 Co-authored-by: sirpy <hadarr@gmail.com> Co-authored-by: Nazar Hussain <nazarhussain@gmail.com> Co-authored-by: jdevcs <86780488+jdevcs@users.noreply.github.com>
- Loading branch information
1 parent
0b890b7
commit b32555c
Showing
8 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var chai = require('chai'); | ||
var assert = chai.assert; | ||
var Eth = require('../packages/web3-eth'); | ||
|
||
var eth = new Eth(); | ||
|
||
var setValue = 123; | ||
|
||
describe('web3.eth', function () { | ||
describe('transactionPollingInterval', function () { | ||
it('should check if transactionPollingInterval is set to proper value', function () { | ||
assert.equal(eth.transactionPollingInterval, 1000); | ||
assert.equal(eth.Contract.transactionPollingInterval, 1000); | ||
assert.equal(eth.getCode.method.transactionPollingInterval, 1000); | ||
}); | ||
it('should set transactionPollingInterval for all sub packages is set to proper value, if Eth package is changed', function () { | ||
eth.transactionPollingInterval = setValue; | ||
|
||
assert.equal(eth.transactionPollingInterval, setValue); | ||
assert.equal(eth.Contract.transactionPollingInterval, setValue); | ||
assert.equal(eth.getCode.method.transactionPollingInterval, setValue); | ||
}); | ||
}); | ||
}); | ||
|