lightninglabs / lightninglabs/pool

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

Open
#432 0 comments 0 reactions 1 assignee View on GitHub

@positiveblue is already working on this.

Since Jan 12, 2023.

bug
Dominant language
Go
Stars
259
Forks
51
PR merge metrics
No merged PRs in 30d

Description

When we close an account we first [update its status and value in the clientdb](https://github.com/lightninglabs/pool/blob/master/account/manager.go#L1683) and then [try to broadcast the spending tx](https://github.com/lightninglabs/pool/blob/master/account/manager.go#L1696).

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](https://github.com/lightninglabs/pool/blob/master/account/manager.go#L1541).

**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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.