Bitcoin Forum

Bitcoin => Wallet software => Topic started by: darkv0rt3x on January 12, 2021, 10:58:16 PM



Title: [Solved] Closing a channel in c-lightning
Post by: darkv0rt3x on January 12, 2021, 10:58:16 PM
Hello.

I tried to open a channel in my c-lightning node but something went wrong.
I got this message:

Code:
{
   "code": -1,
   "message": "Error broadcasting transaction: error code: -26\\nerror message:\\nmempool min fee not met, 328 < 650. Unsent tx discarded 0200000000010479ed1741cc02a629b0a09d3690d266c304d7da5b8ecb...............

(The dots replace an very big hash string)

However, the channel went to "Opening" state. I could see the state in my Spark Wallet and also in the listfunds option of c-lightning, but I think the on-chain transaction never took place. I checked in a block explorer with the funding txid and nothing is found.

So, I was suggested (by a main c-lightning dev) to close the channel and I used the command lightning-cli close to try to close it.
The command used was:
Code:
lightning-cli close channelID 300 returnAddress 0

The channel is now on AWAITING_UNILATERAL but in the meantime, the same person suggested me to use dev-forget-channel but my c-lightning doesn't recognize this command.

So, in this case, that the funding transaction never hit the blockchain but somehow the channel went to OPENNING state and then to AWAITING UNILATERAL, what should/can I do???


Title: Re: Closing a channel in c-lightning
Post by: darkv0rt3x on January 13, 2021, 02:54:13 PM
Ok, update.

I had to recompile the binary with developer option to be able to access that specific command:

Code:
./ configure --enable-developer

Then I just did:
Code:
./lightning-cli --dev-forget-channel IDhere

and it's done. Fixed.