When creating a stake, update the nonce immediately before submitting tx
adamkdean opened this issue · comments
When using the CLI across multiple machines, an issue appears where it seems the same nonce is used for multiple new stake creations that have been pre-prepared. For example, if a bunch of machines all run the create stake command, and they all then pause on Proceed with staking [yn], and then they one by one submit the transactions, the transactions are overwritten leading to just the latest one appearing. For power users, this sucks.
To fix this, CLI should only grab the latest nonce (highest of: wallet nonce, pending txs) immediately before submitting the new stake tx.