I want to limit transaction pending time to 5 seconds, after that the transaction considered as failed;
--txpool.lifetime solve the problem ?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
You can drop/reject transactions using
Ethereal with an automated python script that encounters on every 5 seconds.
To understand more about Ethereal, Go through below link :
Hope this answer will help You.
Just to elaborate on Mahesh's answer.
Transactions can't be cancelled or marked as failed. Once you submit a transaction to the network there is no way to cancel it.
The only thing you can do it overwrite the transaction. Note that this is just a trick and in reality it just means that you send another transaction to the network with the same nonce. If the new transaction has higher gas price miners will probably include that in a block first. Once that transaction is mined the older transaction becomes invalid as a transaction with that nonce has already been mined.