Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

test_splice_rbf_htlc_sigs reads htlc_sigs before the splice lock-in commits

Chiusa Adatta ai principianti
#9,640 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ksedgwic ci sta già lavorando.

Dal 21/10/2026.

  • #9641 di @ksedgwic — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c, sqlite
Ambito
database, testing

Direzione di ricerca

Apri tests/test_splicing.py in prossimità di test_splice_rbf_htlc_sigs ed esamina l’asserzione finale sul conteggio delle righe e il controllo esistente di tre righe. Modifica il controllo finale in modo che attenda finché il conteggio delle righe nel database non raggiunge il valore previsto, quindi esegui il test mirato di splicing. Il lavoro è completo quando attende il commit della transazione di lock-in e rileva in modo affidabile una riga in htlc_sigs.

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

Descrizione

test_splice_rbf_htlc_sigs fails intermittently at its final check with three htlc_sigs rows where it expects one.

tests/test_splicing.py:350: AssertionError
>  assert len(rows) == 1, rows
E  AssertionError: [{'inflight_tx_id': None, 'inflight_tx_outnum': None}, {'inflight_tx_id': b'|\x17!\xa9...', 'inflight_tx_outnum': 0}, {...}]
E  assert 3 == 1

Seen on master at 222078633 in First Integration Tests (6/6), run 39416886545 (2026-10-20, https://github.com/ElementsProject/lightning/actions/runs/39416886545), and on a PR head under valgrind the next day. It is a different failure from the one #9611 fixed; 222078633 is the #9611 merge.

Cause: the test waits for the "CHANNELD_AWAITING_SPLICE to CHANNELD_NORMAL" log line and then reads the database at once. lightningd writes that line from handle_peer_splice_locked(), inside the database transaction that sd_msg_read() wraps around the whole channeld message. The htlc_sigs promotion in wallet_htlcsigs_confirm_inflight() and the inflight cleanup are in the same transaction, which commits only when the handler returns. A read from the test's own sqlite connection in that window still sees the rows from before the lock-in: the active one plus one per candidate.

Fix: wait for the row count, as the test already does for its three-row check.

Part of #9222.

Lingua principale
C
Stelle
3.1k
Fork
1k
Merge medio
4g 2h
PR unite (30g)
30

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 ElementsProject/lightning

Tutte le issue di ElementsProject/lightning

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.