You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Web3 provider timeout is getting ignored .
In my dapp I have set timeout to 5000 . web3.eth.getBlockNumber() doesn't throw even when public node takes more than 5s to respond .
Minimal example
var {Web3} = require('web3');
var web3 = new Web3(new Web3.providers.HttpProvider("https://evm.confluxrpc.com", {timeout: 0 }));
async function getNewBlock (){
newBlock = await web3.eth.getBlockNumber();
return newBlock
}
getNewBlock().then((nb)=>{
console.log(" SHOULDN'T BE PRINTING THE BLOCK BUT IT IS: ",nb," block number")
})