mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
multi: use "bitcoin" chain name constant
Make use of the `bitcoinChainName` constant instead of re-writing the "bitcoin" string.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
8a195ed761
commit
1211e7eb7b
@@ -11,6 +11,7 @@ import (
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/btcsuite/btcd/chaincfg"
|
||||
"github.com/lightningnetwork/lnd"
|
||||
"github.com/lightningnetwork/lnd/chanbackup"
|
||||
"github.com/lightningnetwork/lnd/kvdb/etcd"
|
||||
"github.com/lightningnetwork/lnd/lntest/wait"
|
||||
@@ -157,7 +158,7 @@ func (cfg BaseNodeConfig) DBPath() string {
|
||||
|
||||
func (cfg BaseNodeConfig) ChanBackupPath() string {
|
||||
return filepath.Join(
|
||||
cfg.DataDir, "chain", "bitcoin",
|
||||
cfg.DataDir, "chain", lnd.BitcoinChainName,
|
||||
fmt.Sprintf(
|
||||
"%v/%v", cfg.NetParams.Name,
|
||||
chanbackup.DefaultBackupFileName,
|
||||
|
@@ -18,6 +18,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"github.com/lightningnetwork/lnd"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lntest/rpc"
|
||||
"github.com/lightningnetwork/lnd/lntest/wait"
|
||||
@@ -107,7 +108,7 @@ func NewHarnessNode(t *testing.T, cfg *BaseNodeConfig) (*HarnessNode, error) {
|
||||
cfg.TLSKeyPath = filepath.Join(cfg.BaseDir, "tls.key")
|
||||
|
||||
networkDir := filepath.Join(
|
||||
cfg.DataDir, "chain", "bitcoin", cfg.NetParams.Name,
|
||||
cfg.DataDir, "chain", lnd.BitcoinChainName, cfg.NetParams.Name,
|
||||
)
|
||||
cfg.AdminMacPath = filepath.Join(networkDir, "admin.macaroon")
|
||||
cfg.ReadMacPath = filepath.Join(networkDir, "readonly.macaroon")
|
||||
|
Reference in New Issue
Block a user