lightning-kmp icon indicating copy to clipboard operation
lightning-kmp copied to clipboard

Channel should not go back to `SYNCING` if a closing tx has been detected

Open pm47 opened this issue 4 years ago • 0 comments

In the logs below, Phoenix has initiated a mutual close, which has resulted in a closing tx being published (and seen by Phoenix).

However on next restart Phoenix goes back to state SYNCING, instead of going straight to CLOSING and not expect a channel_reestablish.

   INFO: 2021-10-11T17:25:16.044 | f.a.l.io.Peer: n:03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134 received ClosingSigned(channelId=8eea926396daf1425aaaf5ca80d174b836745d6838109247cdfd0b5f954dfc96, feeSatoshis=170 sat, signature=25c4009e96d73ca2cc1b407618ae2f074cd15c755c8a955ecb5e4429919c47737ba814fd528fc56cc15f98d8b32a983774486c087a01f39557ff1297628badd5, tlvStream=TlvStream(records=[], unknown=[GenericTlv(tag=1, value=00000000000000ab0000000000000157)]))
   INFO: 2021-10-11T17:25:16.044 | f.a.l.io.Peer: n:03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134 received class fr.acinq.lightning.wire.ClosingSigned for channel 8eea926396daf1425aaaf5ca80d174b836745d6838109247cdfd0b5f954dfc96
   INFO: 2021-10-11T17:25:16.044 | f.a.l.channel.ChannelState: c:8eea926396daf1425aaaf5ca80d174b836745d6838109247cdfd0b5f954dfc96 received closingFeeSatoshis=170 sat

   INFO: 2021-10-11T17:33:04.587 | f.a.l.channel.ChannelState: c:8eea926396daf1425aaaf5ca80d174b836745d6838109247cdfd0b5f954dfc96 syncing class fr.acinq.lightning.channel.Closing, waiting fo their channelReestablish message

Related to https://github.com/ACINQ/phoenix-kmm/issues/195, and https://github.com/ACINQ/phoenix/issues/198, because this bug generates display issues due to channel amounts being counted when they are in SYNCING state.

pm47 avatar Oct 11 '21 16:10 pm47