lightninglabs/pool

[bug] account: don't change account status until the action has been successfully completed

positiveblue opened this issue · 0 comments

When we close an account we first update its status and value in the clientdb and then try to broadcast the spending tx.

If we don't succeed publishing the tx our account will already be marked as pending to close so we won't be able to retry it anymore.

Expected behavior

If attempting to close an account fails, the account is not left in a terminal state. You can continue using it normally or retry to close it