Lightning: Stuck on ONCHAIND_THEIR_UNILATERAL

Created on 30 Jan 2018  路  7Comments  路  Source: ElementsProject/lightning

Issue and Steps to Reproduce

  1. Make a lightning connection.
  2. Fund the channel.
  3. Probably killed lightningd incorrectly a few times
  4. Try to buy some stickers (mainnet)
  5. Probably killed lightningd incorrectly (don't recall)

getinfo output

{ "id" : "035ab56628675ad07b2817a9876ac5d5b44b5618134be4d701c2e1d0113ed0d645", "port" : 9735, "address" :
[ ], "version" : "v0.5.2-2016-11-21-1707-ga095a59", "blockheight" : 506853, "network" : "bitcoin" }

Log from start, lots of chatter about stuff I don't understand.

https://pastebin.com/zyNvWRnC

bug needinfo

All 7 comments

I also have a channel stuck in ONCHAIND_THEIR_UNILATERAL. lightningd has observed that the channel's funding transaction has been spent (back to me, as expected) but it is now repeatedly trying (and obviously failing) to broadcast a transaction that is exactly the same as the confirmed transaction that did that spending.

Edit: I think this is a duplicate of #839

We have recently merged PR #842 that should allow lightningd to correctly broadcast transactions again. In addition we created PR #864 so that users can sync with the UTXO set as seen by bitcoind which will thus recover funds that were marked as spent by an unsuccessful funding attempt.

@jonclegg @mocmocamoc could you pull the latest master, compile and use dev-rescan-outputs to recover funds and attempt to open a new channel (with another peer)?

Still showing the ONCHAIND_THEIR_UNILATERAL

    { "id" : "0387e3780a4325eb38421fb83000a6f6c0ffa4a69ea0c81db3f00e8e5015c9e8a1", "connected" : false, "channels" :
        [
            { "state" : "ONCHAIND_THEIR_UNILATERAL", "short_channel_id" : "506549:1079:1", "funding_txid" : "8f40f26fd0af5ebd64d1f4a58d279d72b6acaef62ed2feb70b0f2f9ff69f7dd5", "msatoshi_to_us" : 200000000, "msatoshi_total" : 200000000, "dust_limit_satoshis" : 546, "max_htlc_value_in_flight_msat" : 18446744073709551615, "channel_reserve_satoshis" : 0, "htlc_minimum_msat" : 0, "to_self_delay" : 144, "max_accepted_htlcs" : 483 } ] },

c-lightning log:
https://pastebin.com/721pw1jz

result from dev-rescan-outputs:
https://pastebin.com/C8vUkRAj

Maybe a silly question. listfunds lists things, but how do I get them back into my bitcoin wallet?

To withdraw your funds to a bitcoin wallet use lightning-cli withdraw [btcaddress] all or replace all with the amount you'd like to withdraw.

As for the channel in ONCHAIND_THEIR_UNILATERAL that is ok, the other endpoint closed the channel, we just don't forget the channel just yet.

Is there a way to remove it from the listpeers? the close command doesn't appear to do anything?

cdecker: Thanks! I was able to withdraw my funds to my btc wallet.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SPIRY-RO picture SPIRY-RO  路  4Comments

brunoaduarte picture brunoaduarte  路  4Comments

rustyrussell picture rustyrussell  路  4Comments

AndiMacTen picture AndiMacTen  路  3Comments

saubyk picture saubyk  路  3Comments