mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 15:21:39 +02:00
revoke cancels the original tx (unlocking its inputs) before the replacement self-spend is built, and the steps commit separately, so a crash in between left the inputs Unspent with no self-spend while a retry silently did nothing. - Find the contributed inputs by tx id whether they are still Locked (original tx active) or already Unspent (a prior revoke cancelled them but the self-spend did not finish), instead of Locked-only. - Cancel only when the tx is still in a cancellable state, so a resumed or repeated revoke skips the cancel and re-spends the Unspent inputs. - Once the self-spend completes the inputs reference its tx id, so a later revoke is a no-op. Adds a regression test that interrupts a revoke after the cancel and confirms the next revoke resumes and produces the self-spend. Addresses PR #754 review (revoke.rs).