Skip to content

[bug]: extra directories created in ~/.lnd when using postgres #10598

@ZZiigguurraatt

Description

@ZZiigguurraatt

Pre-Submission Checklist

  • I have searched the existing issues and believe this is a new bug.
  • I am not asking a question about how to use lnd, but reporting a bug (otherwise open a discussion).

LND Version

lncli version 0.20.99-beta commit=lightning-terminal-

LND Configuration

--db.backend=postgres
--lnd.db.use-native-sql

Backend Version

bitcoind 29.1

Backend Configuration

N/A

OS/Distribution

ubuntu 22.04

Bug Details & Steps to Reproduce

When starting up, LND I have the following

$ tree
.
├── data
│   ├── chain
│   │   └── bitcoin
│   │       └── regtest
│   │           ├── admin.macaroon
│   │           ├── chainnotifier.macaroon
│   │           ├── channel.backup
│   │           ├── invoice.macaroon
│   │           ├── invoices.macaroon
│   │           ├── readonly.macaroon
│   │           ├── router.macaroon
│   │           ├── signer.macaroon
│   │           └── walletkit.macaroon
│   ├── graph
│   │   └── regtest
│   └── watchtower
│       └── bitcoin
│           └── regtest
├── letsencrypt
├── logs
│   └── bitcoin
│       └── regtest
│           └── lnd.log
├── tls.cert
└── tls.key

13 directories, 12 files

However, the following empty directories should not exist. They are not needed when running with postgres and I'm also not using letsencrypt.

├── data
│   ├── graph
│   │   └── regtest
│   └── watchtower
│       └── bitcoin
│           └── regtest
├── letsencrypt
13 directories, 12 files

Expected Behavior

Only create the needed directories in order to avoid confusion.

Debug Information

No response

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions