btcpayserver / btcpayserver-docker

Docker resources for hosting BTCPayServer easily
MIT License
560 stars 345 forks source link

dev-forget-channel #884

Open MrTheSoulz opened 3 months ago

MrTheSoulz commented 3 months ago

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!

dennisreimann commented 3 months ago

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.

MrTheSoulz commented 3 months ago

@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 commented 3 months ago

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.

cdecker commented 3 months ago

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.