[bug] Account is left in `Pending Update` state after `spendAccount` fails to broadcast the new tx

Aperta
#438 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
go
Ambito
backend

Direzione di ricerca

Inizia in account/manager.go, in spendAccount, e ispeziona l’aggiornamento dell’account nei punti relativi all’aggiornamento collegato e al fallimento del broadcast. Traccia il modo in cui un broadcast fallito lascia l’AccountDiff e rilascia gli input LND. Il lavoro è completato quando l’aggiornamento fallito viene ripristinato e l’account non rimane più nello stato Pending Update.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

A user deposits new funds in his account calling the DepositAccount rpc method. A new AccountDiff is created and stored (client and server side).

The tx was never broadcasted to the network. The lnd node does not see it in pending txs and the lnd inputs are released. The account diff is not applied to the account because is waiting for confirmations.

Expected behavior

In the spendAccount we should rollback the account update if the broadcast fails which releases the funds in LND.

Actual behavior

The account becomes unusable because of its Pending Updating state.

Workaround

Delete the account diff from the server and make the user go through the recovery account process so it gets in sync with the server with the last state of this account before it became unusable.

Bug spotted in the wild

Lingua principale
Go
Stelle
256
Fork
53
Merge medio
20h 22m
PR unite (30g)
5

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lightninglabs/pool

Tutte le issue di lightninglabs/pool

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.