This PR adds a method called send_and_confirm_bx that handles transaction propegation, mirroring the logic in send_and_confirm as closely as possible along with some enhancements.
I've also in my testing process discovered a bug where the program will hang indefinitely if a mine cycle fails.
On a failure of the entire sending and confirming cycle, the on chain proof.last_hash_at will not update, and so will not be greater than the in memory last_hash_at below:
I've fixed this by updating last_hash_at in the mine function only if a transaction was succesfully sent, otherwise it will remain at the current difficultly.
This PR adds a method called
send_and_confirm_bx
that handles transaction propegation, mirroring the logic insend_and_confirm
as closely as possible along with some enhancements.I've also in my testing process discovered a bug where the program will hang indefinitely if a
mine
cycle fails.On a failure of the entire sending and confirming cycle, the on chain
proof.last_hash_at
will not update, and so will not be greater than the in memorylast_hash_at
below:I've fixed this by updating
last_hash_at
in themine
function only if a transaction was succesfully sent, otherwise it will remain at the current difficultly.