diff --git a/.gitignore b/.gitignore index 0e3f059..2391660 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ terraform/terraform.tfvars +.env diff --git a/polkadot-votebot-cron/index.ts b/polkadot-votebot-cron/index.ts index 2c371c8..d8ca68d 100644 --- a/polkadot-votebot-cron/index.ts +++ b/polkadot-votebot-cron/index.ts @@ -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) } })); }