Fix chain parameters for all commands

pull/3/head
Oliver Gugger 4 years ago
parent af742470b3
commit b6acefd385
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

@ -17,6 +17,8 @@ type dumpChannelsCommand struct {
}
func (c *dumpChannelsCommand) Execute(_ []string) error {
setupChainParams(cfg)
// Check that we have a channel DB.
if c.ChannelDB == "" {
return fmt.Errorf("channel DB is required")

@ -25,6 +25,8 @@ type forceCloseCommand struct {
}
func (c *forceCloseCommand) Execute(_ []string) error {
setupChainParams(cfg)
var (
extendedKey *hdkeychain.ExtendedKey
err error

@ -23,6 +23,8 @@ type genImportScriptCommand struct {
}
func (c *genImportScriptCommand) Execute(_ []string) error {
setupChainParams(cfg)
var (
extendedKey *hdkeychain.ExtendedKey
err error

@ -37,6 +37,8 @@ type rescueClosedCommand struct {
}
func (c *rescueClosedCommand) Execute(_ []string) error {
setupChainParams(cfg)
var (
extendedKey *hdkeychain.ExtendedKey
err error

@ -7,6 +7,8 @@ import (
type showRootKeyCommand struct{}
func (c *showRootKeyCommand) Execute(_ []string) error {
setupChainParams(cfg)
rootKey, _, err := rootKeyFromConsole()
if err != nil {
return fmt.Errorf("failed to read root key from console: %v",

@ -13,6 +13,8 @@ import (
type summaryCommand struct{}
func (c *summaryCommand) Execute(_ []string) error {
setupChainParams(cfg)
// Parse channel entries from any of the possible input files.
entries, err := parseInputType(cfg)
if err != nil {

@ -27,6 +27,8 @@ type sweepTimeLockCommand struct {
}
func (c *sweepTimeLockCommand) Execute(_ []string) error {
setupChainParams(cfg)
var (
extendedKey *hdkeychain.ExtendedKey
err error

@ -45,6 +45,8 @@ type walletInfoCommand struct {
}
func (c *walletInfoCommand) Execute(_ []string) error {
setupChainParams(cfg)
var (
publicWalletPw = lnwallet.DefaultPublicPassphrase
privateWalletPw = lnwallet.DefaultPrivatePassphrase
@ -109,7 +111,8 @@ func walletInfo(w *wallet.Wallet) error {
},
})
if err != nil {
return err
return fmt.Errorf("unable to open key ring for coin type %d: " +
"%v", chainParams.HDCoinType, err)
}
idPrivKey.Curve = btcec.S256()
fmt.Printf(

Loading…
Cancel
Save