lnwallet: export btcwallet.NetworkDir
This commit is contained in:
parent
b29af869c7
commit
e6cc46d84e
@ -61,7 +61,7 @@ var _ lnwallet.WalletController = (*BtcWallet)(nil)
|
|||||||
// configuration struct.
|
// configuration struct.
|
||||||
func New(cfg Config) (*BtcWallet, error) {
|
func New(cfg Config) (*BtcWallet, error) {
|
||||||
// Ensure the wallet exists or create it when the create flag is set.
|
// Ensure the wallet exists or create it when the create flag is set.
|
||||||
netDir := networkDir(cfg.DataDir, cfg.NetParams)
|
netDir := NetworkDir(cfg.DataDir, cfg.NetParams)
|
||||||
|
|
||||||
var pubPass []byte
|
var pubPass []byte
|
||||||
if cfg.PublicPass == nil {
|
if cfg.PublicPass == nil {
|
||||||
|
@ -77,9 +77,9 @@ type Config struct {
|
|||||||
NetParams *chaincfg.Params
|
NetParams *chaincfg.Params
|
||||||
}
|
}
|
||||||
|
|
||||||
// networkDir returns the directory name of a network directory to hold wallet
|
// NetworkDir returns the directory name of a network directory to hold wallet
|
||||||
// files.
|
// files.
|
||||||
func networkDir(dataDir string, chainParams *chaincfg.Params) string {
|
func NetworkDir(dataDir string, chainParams *chaincfg.Params) string {
|
||||||
netname := chainParams.Name
|
netname := chainParams.Name
|
||||||
|
|
||||||
// For now, we must always name the testnet data directory as "testnet"
|
// For now, we must always name the testnet data directory as "testnet"
|
||||||
|
Loading…
Reference in New Issue
Block a user