Skip to content

Commit

Permalink
Check for nonce too low error when replacing transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
yondonfu committed Jun 25, 2018
1 parent 8d7113d commit 16bc52d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/eventservices/rewardservice.go
Expand Up @@ -107,7 +107,7 @@ func (s *RewardService) tryReward() error {
// Replace pending tx by bumping gas price
tx, err = s.client.ReplaceTransaction(s.pendingTx, "reward", nil)
if err != nil {
if err == eth.ErrReplacingMinedTx {
if err == eth.ErrReplacingMinedTx || err.Error() == "nonce too low" {
// Pending tx confirmed so we should not try to replace next time
s.pendingTx = nil
}
Expand Down

0 comments on commit 16bc52d

Please sign in to comment.