btcpayserver-docker icon indicating copy to clipboard operation
btcpayserver-docker copied to clipboard

dev-forget-channel

Open MrTheSoulz opened this issue 11 months ago • 4 comments

Hello, how can I enable dev options for clighting? I have an open channel that never hit on-chain (I think it erro'ed) and o closed it using cli after waiting more then a week. Now it's been stuck on "Awaiting Unilateral Close". After some googling I found I can use "bitcoin-lightning-cli.sh dev-forget-channel ID" but that requires clighting to be compiled with DEVELOPER=1. Would appreciate some help on doing it on the docker version, thanks!

MrTheSoulz avatar Mar 06 '24 09:03 MrTheSoulz

You could try to edit the Core Lightning config like this:

version: '3'
services:
  clightning_bitcoin:
    environment:
      LIGHTNINGD_DEVELOPER: 1

Not sure if it needs to be LIGHTNINGD_DEVELOPER or just DEVELOPER though. See the docs instructions linked to above for details.

dennisreimann avatar Mar 06 '24 10:03 dennisreimann

@dennisreimann thanks. I Just had the change to try it. Unfortunately it didn't work, got any other ideas by change? Here's what I did:

version: '3'
services:
  clightning_bitcoin:
    environment:
      LIGHTNINGD_DEVELOPER: 1
      DEVELOPER: 1

at:

docker-compose-generator/docker-fragments/opt-lightningd-config.custom.yml 

then ran:

export BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-lightningd-config.custom"
. ./btcpay-setup.sh -i

I can see it loaded my file:

Selected fragments:
	nginx
	btcpayserver
	litecoin
	bitcoin
	bitcoin-clightning
	opt-save-storage-s
	opt-lnd-autopilot
	opt-lightningd-config.custom
	opt-mempoolfullrbf
	opt-add-tor
	nginx-https
	nbxplorer
	postgres
	btcpayserver-nginx
Generated /app/Generated/pull-images.sh
Generated /app/Generated/save-images.sh
Generated /app/Generated/docker-compose.generated.yml

MrTheSoulz avatar Mar 08 '24 09:03 MrTheSoulz

UPDATE: maybe it did work... the output of "bitcoin-lightning-cli.sh" shows:

=== developer ===

dev-listaddrs [bip32_max_index]
    Show addresses list up to derivation {index} (default is the last bip32 index)

dev-rescan-outputs 
    Synchronize the state of our funds with bitcoind

---

but "dev-forget-channel" seems missing. I'm unsure if it's disabled or this option was removed/replaced.

MrTheSoulz avatar Mar 08 '24 10:03 MrTheSoulz

Starting with v24.02 CLN can be reconfigured at runtime using the --developer flag. The compilation flag has been removed on the other hand, as it is no longer necessary.

cdecker avatar Mar 17 '24 12:03 cdecker