Moves the rewards distribution to a tokio thread spawned from the main thread, listening directly to the rewards channel.
This allows for the server to receive and distribute rewards if/when the submission instruction lands, without having to wait for unreliable signature confirmations.
Additionally, the transaction submission is no longer handled in a retry loop. Instead, the main contributions loop will exit the current loop and move onto the next one.
At the beginning of each contribution loop, there's "reset" check. If the proof account did change, the loop will exit again, this time waiting for new contributions, instead of spamming 0x1 errors.
Moves the rewards distribution to a tokio thread spawned from the main thread, listening directly to the rewards channel.
This allows for the server to receive and distribute rewards if/when the submission instruction lands, without having to wait for unreliable signature confirmations.
Additionally, the transaction submission is no longer handled in a retry loop. Instead, the main contributions loop will exit the current loop and move onto the next one. At the beginning of each contribution loop, there's "reset" check. If the proof account did change, the loop will exit again, this time waiting for new contributions, instead of spamming 0x1 errors.