Merge pull request #3213 from Roasbeef/bump-fee-nil-fix
lnrpc/walletrpc: reject nil outpoints as args
This commit is contained in:
commit
d6d87e12fe
@ -420,6 +420,10 @@ func (w *WalletKit) PendingSweeps(ctx context.Context,
|
|||||||
// unmarshallOutPoint converts an outpoint from its lnrpc type to its canonical
|
// unmarshallOutPoint converts an outpoint from its lnrpc type to its canonical
|
||||||
// type.
|
// type.
|
||||||
func unmarshallOutPoint(op *lnrpc.OutPoint) (*wire.OutPoint, error) {
|
func unmarshallOutPoint(op *lnrpc.OutPoint) (*wire.OutPoint, error) {
|
||||||
|
if op == nil {
|
||||||
|
return nil, fmt.Errorf("empty outpoint provided")
|
||||||
|
}
|
||||||
|
|
||||||
var hash chainhash.Hash
|
var hash chainhash.Hash
|
||||||
switch {
|
switch {
|
||||||
case len(op.TxidBytes) == 0 && len(op.TxidStr) == 0:
|
case len(op.TxidBytes) == 0 && len(op.TxidStr) == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user