cmd/lncli+lnwallet: specify need for witness outputs for funding channels

In this commit, we extend the help message for `newaddress` 
to indicate which address types can be used when directly 
funding channels. Additionally, we add some additional text 
to the insufficient funding error to detail that we don't have 
enough witness outputs.
This commit is contained in:
Braydon Fuller 2017-09-29 18:38:26 -04:00 committed by Olaoluwa Osuntokun
parent e2fc693206
commit 53181f3ec3
2 changed files with 2 additions and 2 deletions

@ -60,7 +60,7 @@ var newAddressCommand = cli.Command{
Description: "Generate a wallet new address. Address-types has to be one of:\n" +
" - p2wkh: Push to witness key hash\n" +
" - np2wkh: Push to nested witness key hash\n" +
" - p2pkh: Push to public key hash",
" - p2pkh: Push to public key hash (can't be used to fund channels)",
Action: newAddress,
}

@ -60,7 +60,7 @@ type ErrInsufficientFunds struct {
}
func (e *ErrInsufficientFunds) Error() string {
return fmt.Sprintf("not enough outputs to create funding transaction,"+
return fmt.Sprintf("not enough witness outputs to create funding transaction,"+
" need %v only have %v available", e.amountAvailable,
e.amountSelected)
}