-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transactionPollingTimeout might not work as documented #3513
Comments
Thanks for reporting, will investigate. Scanning the code in web3-eth, it's possible this isn't wired up correctly. (related: #3498) |
@miohtama I've tried to reproduce this in #3533 but things seem to be working as expected. Have a couple questions...
Of necessity they set the polling timeout threshold lower than the default. But the outcome suggests that it's being set and evaluated correctly. |
It is the default WalletConnect provider, so it is Infura + HTTPS. I tried to reproduce the issue by setting a timeout to 1 seconds. The timeout is not triggered. I can try again - but I would first also ask on the advice what is the proper code to configure the timeout for the smart contract interaction, as it is not clear from the document. Then I can write a minimum repeatable example - which hopefully we cannot repeat. |
The tests written to validate the setting in #3533 use web3.eth.transactionPollingTimeout = value If you're experiencing the |
Closing with 1.2.9...please just ping if this is still happening. |
Expected behavior
Setting web3.eth.transactionPollingTimeout to a value changees the trasnaction polling timeout.
Actual behavior
await contract.methods.myMethod.send()
still uses the default 750 seconds value.Steps to reproduce the behavior
Trying to change the behavior using the following code.
... does not seem to work as in here...
https://github.com/ethereum/web3.js/blob/2a5c5cb740ee8962846ac9d5416e6b8cc2e7d95d/packages/web3-core-method/src/index.js#L57
...the config value is read when the
Method
ofeth_getTransactionReceipt
is being constructed, which is only whennew Web3()
constructor is called, which is before you can actually set a valueweb3.eth.transactionPollingTimeout
.I might be wrong and misunderstanding how is it supposed to work, but this is my initial analysis. Please advise if I misunderstanding and if there is a way to override
transactionPollingTimeout
easily for theweb3
instance and all transactions.Environment
web3.js 1.2.6
The text was updated successfully, but these errors were encountered: