By default there are 24 confirmations but I am running a testnet with just 3 miners and I would like to change this number bucause it makes not sense to have 24. I have been checking transactionConfirmationBlocks
on the following way:
const options = {
transactionConfirmationBlocks: 3
}
var web3 = new Web3(new Web3.providers.WebsocketProvider(provider_string, options));
I am not getting errors, but when I make a transaction it is still making 24 confirmations. if I check the number of confirmations (web3.eth.transactionConfirmationBlocks
) is still 24. What is the right way to set the number of confirmations?
options
have to be passed as a second argument tonew Web3(..)
rather than...WebSocketProvider(..)
.