postpromoter icon indicating copy to clipboard operation
postpromoter copied to clipboard

Bot refunding All Users on First Start

Open spiftheninja opened this issue 6 years ago • 2 comments

Maybe this has been addressed somewhere, but I couldn't find it.

Upon first starting the bot (first time), it will automatically refund all accounts in the transaction history which do not represent a 'valid bid'. This caused me a large headache as it sent out all my SBD to completely unrelated accounts.

Is there a way around this already?

I propose an option to 'skip refunds' except for those on the current or first round, or to have only bot look for transactions that happened within the X time period.

The bot was refunding users who had paid me days ago, up to a week!

This could be easily fixed with a minor tweak which would make sure it only refunds users who have paid during the current round, or within X given time frame.

Thanks for checking into this, hope it helps.

spiftheninja avatar Mar 20 '18 03:03 spiftheninja

@spiftheninja if the bot software is run for the very first time it does not process any transactions on the account from before it started. If the bot has been run before and then is stopped and started again later - then when it starts again later it will pick up all transactions since the last time it was stopped. My guess is this is what happened in your case.

I agree that it would be a good improvement to limit how many transactions it will process in this scenario and will add that to my development list. In the meantime you can delete the state.json file if you are restarting the bot after it has been stopped for a long time to prevent it from processing old transactions.

MattyIce avatar Mar 22 '18 14:03 MattyIce

I sent a PR to fix this #73

I think just deleting state.json will cause another issue. If there are outstanding bids, bot will ignore them.

chhantyal avatar Apr 15 '18 21:04 chhantyal