Skip to content

Commit

Permalink
do not alert when votebot transaction retracted
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasochem committed May 9, 2022
1 parent ec14ee6 commit 50cc9bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
terraform/terraform.tfvars
.env
5 changes: 4 additions & 1 deletion polkadot-votebot-cron/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,12 @@ async function main() {
console.log("extrinsic success in finalized block, exiting")
process.exit(0);
}
} else if (status.isInvalid || status.isDropped || status.isRetracted) {
} else if (status.isInvalid || status.isDropped) {
let slackMessage = `Vote extrinsic failed for validator ${stash_alias}(${stash_account}) with error ${status}.`;
sendErrorToSlackAndExit(slackMessage);
} else if (status.isRetracted) {
// fail the job but do not alert. It is likely the transaction will go through at next try.
process.exit(1)
}
}));
}
Expand Down

0 comments on commit 50cc9bc

Please sign in to comment.