Merge pull request from LN-Zap/feat/spend-unconfirmed-estimate

Support spend_unconfirmed in EstimateFee and FundPsbt
This commit is contained in:
Olaoluwa Osuntokun 2021-04-26 15:48:11 -07:00 committed by GitHub
commit bfcaf02f04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 1068 additions and 906 deletions

File diff suppressed because it is too large Load Diff

@ -899,6 +899,13 @@ message EstimateFeeRequest {
// The target number of blocks that this transaction should be confirmed
// by.
int32 target_conf = 2;
// The minimum number of confirmations each one of your outputs used for
// the transaction must satisfy.
int32 min_confs = 3;
// Whether unconfirmed outputs should be used as inputs for the transaction.
bool spend_unconfirmed = 4;
}
message EstimateFeeResponse {

@ -2034,6 +2034,22 @@
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "min_confs",
"description": "The minimum number of confirmations each one of your outputs used for\nthe transaction must satisfy.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "spend_unconfirmed",
"description": "Whether unconfirmed outputs should be used as inputs for the transaction.",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
}
],
"tags": [

@ -14,7 +14,6 @@ import (
)
const (
defaultMinConf = 1
defaultMaxConf = math.MaxInt32
)

@ -1879,7 +1879,12 @@ type FundPsbtRequest struct {
//
//The name of the account to fund the PSBT with. If empty, the default wallet
//account is used.
Account string `protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"`
Account string `protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"`
// The minimum number of confirmations each one of your outputs used for
// the transaction must satisfy.
MinConfs int32 `protobuf:"varint,6,opt,name=min_confs,json=minConfs,proto3" json:"min_confs,omitempty"`
// Whether unconfirmed outputs should be used as inputs for the transaction.
SpendUnconfirmed bool `protobuf:"varint,7,opt,name=spend_unconfirmed,json=spendUnconfirmed,proto3" json:"spend_unconfirmed,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -1991,6 +1996,20 @@ func (m *FundPsbtRequest) GetAccount() string {
return ""
}
func (m *FundPsbtRequest) GetMinConfs() int32 {
if m != nil {
return m.MinConfs
}
return 0
}
func (m *FundPsbtRequest) GetSpendUnconfirmed() bool {
if m != nil {
return m.SpendUnconfirmed
}
return false
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*FundPsbtRequest) XXX_OneofWrappers() []interface{} {
return []interface{}{
@ -2403,148 +2422,149 @@ func init() {
func init() { proto.RegisterFile("walletrpc/walletkit.proto", fileDescriptor_6cc6942ac78249e5) }
var fileDescriptor_6cc6942ac78249e5 = []byte{
// 2249 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0x5f, 0x73, 0xe2, 0xc8,
0x11, 0x5f, 0x01, 0xb6, 0xa1, 0x01, 0x1b, 0x0f, 0xf8, 0xcf, 0xb2, 0xde, 0xb3, 0x57, 0x97, 0x64,
0x9d, 0xbb, 0x3d, 0x5c, 0xd9, 0xcb, 0xe6, 0x76, 0x37, 0xa9, 0x54, 0x6c, 0x8c, 0x0b, 0x17, 0xd8,
0x38, 0x02, 0xaf, 0xb3, 0xc9, 0x83, 0x4a, 0x46, 0x63, 0xa3, 0x32, 0x48, 0x3a, 0x69, 0x30, 0x70,
0x4f, 0xf7, 0x35, 0x52, 0x95, 0xef, 0x90, 0xaa, 0x3c, 0xa7, 0xf2, 0x9e, 0xca, 0xb7, 0xc8, 0xe7,
0xc8, 0x43, 0x6a, 0xfe, 0x48, 0x1a, 0x09, 0xec, 0xbb, 0xab, 0xbb, 0x27, 0xa3, 0xfe, 0xf5, 0xf4,
0xf4, 0xf4, 0x9f, 0xe9, 0xee, 0x31, 0x3c, 0x9d, 0x18, 0xc3, 0x21, 0x26, 0x9e, 0xdb, 0x3f, 0xe0,
0xbf, 0xee, 0x2c, 0x52, 0x73, 0x3d, 0x87, 0x38, 0x28, 0x17, 0x42, 0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, 0x76, 0xa3, 0x48, 0x76, 0xff, 0x03, 0xdd, 0x70, 0xf5, 0xd3,
0x47, 0x79, 0x84, 0xf0, 0x3a, 0x64, 0x83, 0x0e, 0x10, 0xc9, 0xe7, 0x49, 0xb4, 0xb8, 0xd5, 0x67,
0x0b, 0xb1, 0x28, 0xcf, 0xe4, 0xd6, 0x21, 0x96, 0x67, 0x0b, 0xba, 0x94, 0x58, 0x9e, 0x2d, 0xea,
0x39, 0x8e, 0x7e, 0xf5, 0xe7, 0x83, 0x5b, 0x8b, 0x0c, 0xc6, 0xd7, 0xb5, 0xbe, 0x33, 0x3a, 0x18,
0xd2, 0x61, 0xda, 0xb6, 0xec, 0x5b, 0x1b, 0x93, 0x89, 0xe3, 0xdd, 0x1d, 0x0c, 0x6d, 0xf3, 0x80,
0x75, 0x4e, 0x07, 0xa1, 0x9c, 0xeb, 0x65, 0xf6, 0x5f, 0x85, 0x2f, 0xff, 0x1f, 0x00, 0x00, 0xff,
0xff, 0x0a, 0xc3, 0xd3, 0xee, 0x9e, 0x18, 0x00, 0x00,
// 2262 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0x5f, 0x53, 0xe3, 0xc8,
0x11, 0x5f, 0xff, 0x01, 0xec, 0xb6, 0x0d, 0x66, 0x6c, 0xfe, 0xac, 0x97, 0x5d, 0x58, 0x5d, 0x92,
0x25, 0x77, 0x7b, 0xa6, 0xc2, 0x65, 0x73, 0xbb, 0x9b, 0x54, 0x2a, 0x60, 0x4c, 0x99, 0xb2, 0xc1,
0x8e, 0x6c, 0x96, 0x6c, 0xf2, 0xa0, 0x12, 0xd6, 0x80, 0x55, 0xd8, 0x92, 0x4e, 0x1a, 0x63, 0xfb,
0x9e, 0xee, 0x3b, 0xe4, 0x29, 0x55, 0xf9, 0x0e, 0xa9, 0xca, 0x73, 0x2a, 0x5f, 0x20, 0xdf, 0x22,
0x9f, 0x23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0x6c, 0x8d, 0x68, 0x9b, 0x9f, 0x82, 0x23, 0xda,
0x16, 0x4d, 0xbb, 0x2a, 0x14, 0x22, 0x83, 0x4b, 0x24, 0x26, 0x8b, 0x46, 0x9d, 0x48, 0x4c, 0x16,
0xcf, 0x3c, 0x7f, 0x80, 0x15, 0xd1, 0xf2, 0xa3, 0xa7, 0x12, 0x73, 0x74, 0x8c, 0x89, 0x78, 0x2c,
0x36, 0x21, 0xf8, 0x07, 0x4f, 0x98, 0xb4, 0xf3, 0x40, 0x0b, 0xbe, 0xf8, 0xe0, 0xc5, 0x8c, 0xf9,
0x0b, 0x14, 0xe3, 0x7d, 0x2d, 0x92, 0xc3, 0xff, 0x40, 0x5f, 0x5d, 0xf9, 0xec, 0x51, 0x1e, 0xa1,
0xbc, 0x06, 0x19, 0xbf, 0x03, 0x44, 0xf2, 0x7e, 0x62, 0xcd, 0x72, 0xe5, 0xd9, 0x42, 0x2c, 0x3c,
0x67, 0x72, 0xeb, 0x10, 0x39, 0x67, 0x0b, 0xba, 0x94, 0xc8, 0x39, 0x5b, 0xd4, 0x73, 0x1c, 0xff,
0xea, 0xcf, 0x07, 0xb7, 0x26, 0x19, 0x8c, 0xaf, 0xab, 0x7d, 0x7b, 0x74, 0x30, 0xa4, 0x63, 0xb9,
0x65, 0x5a, 0xb7, 0x16, 0x26, 0x13, 0xdb, 0xbd, 0x3b, 0x18, 0x5a, 0xc6, 0x01, 0xeb, 0x9c, 0x0e,
0x02, 0x3d, 0xd7, 0xcb, 0xec, 0xff, 0x13, 0x5f, 0xfd, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x19, 0xd8,
0xa1, 0x09, 0xe8, 0x18, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

@ -724,6 +724,13 @@ message FundPsbtRequest {
account is used.
*/
string account = 5;
// The minimum number of confirmations each one of your outputs used for
// the transaction must satisfy.
int32 min_confs = 6;
// Whether unconfirmed outputs should be used as inputs for the transaction.
bool spend_unconfirmed = 7;
}
message FundPsbtResponse {
/*

@ -1010,6 +1010,16 @@
"account": {
"type": "string",
"description": "The name of the account to fund the PSBT with. If empty, the default wallet\naccount is used."
},
"min_confs": {
"type": "integer",
"format": "int32",
"description": "The minimum number of confirmations each one of your outputs used for\nthe transaction must satisfy."
},
"spend_unconfirmed": {
"type": "boolean",
"format": "boolean",
"description": "Whether unconfirmed outputs should be used as inputs for the transaction."
}
}
},

@ -1069,6 +1069,15 @@ func (w *WalletKit) FundPsbt(_ context.Context,
"specify either target_conf or set_per_vbyte")
}
// Then, we'll extract the minimum number of confirmations that each
// output we use to fund the transaction should satisfy.
minConfs, err := lnrpc.ExtractMinConfs(
req.GetMinConfs(), req.GetSpendUnconfirmed(),
)
if err != nil {
return nil, err
}
// The RPC parsing part is now over. Several of the following operations
// require us to hold the global coin selection lock so we do the rest
// of the tasks while holding the lock. The result is a list of locked
@ -1087,7 +1096,7 @@ func (w *WalletKit) FundPsbt(_ context.Context,
if len(packet.UnsignedTx.TxIn) > 0 {
// Get a list of all unspent witness outputs.
utxos, err := w.cfg.Wallet.ListUnspentWitness(
defaultMinConf, defaultMaxConf, account,
minConfs, defaultMaxConf, account,
)
if err != nil {
return err

@ -107,15 +107,15 @@ func (w *WalletController) SendOutputs(outputs []*wire.TxOut,
// CreateSimpleTx currently returns dummy values.
func (w *WalletController) CreateSimpleTx(outputs []*wire.TxOut,
_ chainfee.SatPerKWeight, _ bool) (*txauthor.AuthoredTx, error) {
_ chainfee.SatPerKWeight, _ int32, _ bool) (*txauthor.AuthoredTx, error) {
return nil, nil
}
// ListUnspentWitness is called by the wallet when doing coin selection. We just
// need one unspent for the funding transaction.
func (w *WalletController) ListUnspentWitness(minconfirms,
maxconfirms int32, _ string) ([]*lnwallet.Utxo, error) {
func (w *WalletController) ListUnspentWitness(minConfs,
maxConfs int32, _ string) ([]*lnwallet.Utxo, error) {
// If the mock already has a list of utxos, return it.
if w.Utxos != nil {

@ -484,7 +484,7 @@ func (b *BtcWallet) ImportPublicKey(pubKey *btcec.PublicKey,
//
// This is a part of the WalletController interface.
func (b *BtcWallet) SendOutputs(outputs []*wire.TxOut,
feeRate chainfee.SatPerKWeight, minconf int32, label string) (*wire.MsgTx, error) {
feeRate chainfee.SatPerKWeight, minConfs int32, label string) (*wire.MsgTx, error) {
// Convert our fee rate from sat/kw to sat/kb since it's required by
// SendOutputs.
@ -495,13 +495,13 @@ func (b *BtcWallet) SendOutputs(outputs []*wire.TxOut,
return nil, lnwallet.ErrNoOutputs
}
// Sanity check minconf.
if minconf < 0 {
// Sanity check minConfs.
if minConfs < 0 {
return nil, lnwallet.ErrInvalidMinconf
}
return b.wallet.SendOutputs(
outputs, nil, defaultAccount, minconf, feeSatPerKB, label,
outputs, nil, defaultAccount, minConfs, feeSatPerKB, label,
)
}
@ -519,7 +519,8 @@ func (b *BtcWallet) SendOutputs(outputs []*wire.TxOut,
//
// This is a part of the WalletController interface.
func (b *BtcWallet) CreateSimpleTx(outputs []*wire.TxOut,
feeRate chainfee.SatPerKWeight, dryRun bool) (*txauthor.AuthoredTx, error) {
feeRate chainfee.SatPerKWeight, minConfs int32,
dryRun bool) (*txauthor.AuthoredTx, error) {
// The fee rate is passed in using units of sat/kw, so we'll convert
// this to sat/KB as the CreateSimpleTx method requires this unit.
@ -529,6 +530,12 @@ func (b *BtcWallet) CreateSimpleTx(outputs []*wire.TxOut,
if len(outputs) < 1 {
return nil, lnwallet.ErrNoOutputs
}
// Sanity check minConfs.
if minConfs < 0 {
return nil, lnwallet.ErrInvalidMinconf
}
for _, output := range outputs {
// When checking an output for things like dusty-ness, we'll
// use the default mempool relay fee rather than the target
@ -544,7 +551,7 @@ func (b *BtcWallet) CreateSimpleTx(outputs []*wire.TxOut,
}
return b.wallet.CreateSimpleTx(
nil, defaultAccount, outputs, 1, feeSatPerKB, dryRun,
nil, defaultAccount, outputs, minConfs, feeSatPerKB, dryRun,
)
}
@ -608,11 +615,11 @@ func (b *BtcWallet) ReleaseOutput(id wtxmgr.LockID, op wire.OutPoint) error {
}
// ListUnspentWitness returns all unspent outputs which are version 0 witness
// programs. The 'minconfirms' and 'maxconfirms' parameters indicate the minimum
// programs. The 'minConfs' and 'maxConfs' parameters indicate the minimum
// and maximum number of confirmations an output needs in order to be returned
// by this method. Passing -1 as 'minconfirms' indicates that even unconfirmed
// outputs should be returned. Using MaxInt32 as 'maxconfirms' implies returning
// all outputs with at least 'minconfirms'. The account parameter serves as a
// by this method. Passing -1 as 'minConfs' indicates that even unconfirmed
// outputs should be returned. Using MaxInt32 as 'maxConfs' implies returning
// all outputs with at least 'minConfs'. The account parameter serves as a
// filter to retrieve the unspent outputs for a specific account. When empty,
// the unspent outputs of all wallet accounts are returned.
//

@ -66,7 +66,7 @@ var (
var ErrNoOutputs = errors.New("no outputs")
// ErrInvalidMinconf is returned if we try to create a transaction with
// invalid minconf value.
// invalid minConfs value.
var ErrInvalidMinconf = errors.New("minimum number of confirmations must " +
"be a non-negative number")
@ -236,7 +236,7 @@ type WalletController interface {
//
// NOTE: This method requires the global coin selection lock to be held.
SendOutputs(outputs []*wire.TxOut,
feeRate chainfee.SatPerKWeight, minconf int32, label string) (*wire.MsgTx, error)
feeRate chainfee.SatPerKWeight, minConfs int32, label string) (*wire.MsgTx, error)
// CreateSimpleTx creates a Bitcoin transaction paying to the specified
// outputs. The transaction is not broadcasted to the network. In the
@ -251,20 +251,20 @@ type WalletController interface {
//
// NOTE: This method requires the global coin selection lock to be held.
CreateSimpleTx(outputs []*wire.TxOut, feeRate chainfee.SatPerKWeight,
dryRun bool) (*txauthor.AuthoredTx, error)
minConfs int32, dryRun bool) (*txauthor.AuthoredTx, error)
// ListUnspentWitness returns all unspent outputs which are version 0
// witness programs. The 'minconfirms' and 'maxconfirms' parameters
// witness programs. The 'minConfs' and 'maxConfs' parameters
// indicate the minimum and maximum number of confirmations an output
// needs in order to be returned by this method. Passing -1 as
// 'minconfirms' indicates that even unconfirmed outputs should be
// returned. Using MaxInt32 as 'maxconfirms' implies returning all
// outputs with at least 'minconfirms'. The account parameter serves as
// 'minConfs' indicates that even unconfirmed outputs should be
// returned. Using MaxInt32 as 'maxConfs' implies returning all
// outputs with at least 'minConfs'. The account parameter serves as
// a filter to retrieve the unspent outputs for a specific account.
// When empty, the unspent outputs of all wallet accounts are returned.
//
// NOTE: This method requires the global coin selection lock to be held.
ListUnspentWitness(minconfirms, maxconfirms int32,
ListUnspentWitness(minConfs, maxConfs int32,
accountFilter string) ([]*Utxo, error)
// ListTransactionDetails returns a list of all transactions which are

@ -2547,6 +2547,8 @@ func testLastUnusedAddr(miner *rpctest.Harness,
// testCreateSimpleTx checks that a call to CreateSimpleTx will return a
// transaction that is equal to the one that is being created by SendOutputs in
// a subsequent call.
// All test cases are doubled-up: one for testing unconfirmed inputs,
// one for testing only confirmed inputs.
func testCreateSimpleTx(r *rpctest.Harness, w *lnwallet.LightningWallet,
_ *lnwallet.LightningWallet, t *testing.T) {
@ -2558,51 +2560,108 @@ func testCreateSimpleTx(r *rpctest.Harness, w *lnwallet.LightningWallet,
// The test cases we will run through for all backends.
testCases := []struct {
outVals []int64
feeRate chainfee.SatPerKWeight
valid bool
outVals []int64
feeRate chainfee.SatPerKWeight
valid bool
unconfirmed bool
}{
{
outVals: []int64{},
feeRate: 2500,
valid: false, // No outputs.
outVals: []int64{},
feeRate: 2500,
valid: false, // No outputs.
unconfirmed: false,
},
{
outVals: []int64{},
feeRate: 2500,
valid: false, // No outputs.
unconfirmed: true,
},
{
outVals: []int64{200},
feeRate: 2500,
valid: false, // Dust output.
outVals: []int64{200},
feeRate: 2500,
valid: false, // Dust output.
unconfirmed: false,
},
{
outVals: []int64{200},
feeRate: 2500,
valid: false, // Dust output.
unconfirmed: true,
},
{
outVals: []int64{1e8},
feeRate: 2500,
valid: true,
outVals: []int64{1e8},
feeRate: 2500,
valid: true,
unconfirmed: false,
},
{
outVals: []int64{1e8, 2e8, 1e8, 2e7, 3e5},
feeRate: 2500,
valid: true,
outVals: []int64{1e8},
feeRate: 2500,
valid: true,
unconfirmed: true,
},
{
outVals: []int64{1e8, 2e8, 1e8, 2e7, 3e5},
feeRate: 2500,
valid: true,
unconfirmed: false,
},
{
outVals: []int64{1e8, 2e8, 1e8, 2e7, 3e5},
feeRate: 12500,
valid: true,
outVals: []int64{1e8, 2e8, 1e8, 2e7, 3e5},
feeRate: 2500,
valid: true,
unconfirmed: true,
},
{
outVals: []int64{1e8, 2e8, 1e8, 2e7, 3e5},
feeRate: 12500,
valid: true,
unconfirmed: false,
},
{
outVals: []int64{1e8, 2e8, 1e8, 2e7, 3e5},
feeRate: 50000,
valid: true,
outVals: []int64{1e8, 2e8, 1e8, 2e7, 3e5},
feeRate: 12500,
valid: true,
unconfirmed: true,
},
{
outVals: []int64{1e8, 2e8, 1e8, 2e7, 3e5},
feeRate: 50000,
valid: true,
unconfirmed: false,
},
{
outVals: []int64{1e8, 2e8, 1e8, 2e7, 3e5},
feeRate: 50000,
valid: true,
unconfirmed: true,
},
{
outVals: []int64{1e8, 2e8, 1e8, 2e7, 3e5, 1e8, 2e8,
1e8, 2e7, 3e5},
feeRate: 44250,
valid: true,
unconfirmed: false,
},
{
outVals: []int64{1e8, 2e8, 1e8, 2e7, 3e5, 1e8, 2e8,
1e8, 2e7, 3e5},
feeRate: 44250,
valid: true,
feeRate: 44250,
valid: true,
unconfirmed: true,
},
}
for i, test := range testCases {
var minConfs int32 = 1
feeRate := test.feeRate
// Grab some fresh addresses from the miner that we will send
@ -2629,7 +2688,7 @@ func testCreateSimpleTx(r *rpctest.Harness, w *lnwallet.LightningWallet,
// Now try creating a tx spending to these outputs.
createTx, createErr := w.CreateSimpleTx(
outputs, feeRate, true,
outputs, feeRate, minConfs, true,
)
switch {
case test.valid && createErr != nil:
@ -2646,7 +2705,7 @@ func testCreateSimpleTx(r *rpctest.Harness, w *lnwallet.LightningWallet,
// _very_ similar to the one we just created being sent. The
// only difference is that the dry run tx is not signed, and
// that the change output position might be different.
tx, sendErr := w.SendOutputs(outputs, feeRate, 1, labels.External)
tx, sendErr := w.SendOutputs(outputs, feeRate, minConfs, labels.External)
switch {
case test.valid && sendErr != nil:
t.Fatalf("got unexpected error when sending tx: %v",

@ -964,7 +964,7 @@ func allowCORS(handler http.Handler, origins []string) http.Handler {
// more addresses specified in the passed payment map. The payment map maps an
// address to a specified output value to be sent to that address.
func (r *rpcServer) sendCoinsOnChain(paymentMap map[string]int64,
feeRate chainfee.SatPerKWeight, minconf int32,
feeRate chainfee.SatPerKWeight, minConfs int32,
label string) (*chainhash.Hash, error) {
outputs, err := addrPairsToOutputs(paymentMap, r.cfg.ActiveNetParams.Params)
@ -975,7 +975,7 @@ func (r *rpcServer) sendCoinsOnChain(paymentMap map[string]int64,
// We first do a dry run, to sanity check we won't spend our wallet
// balance below the reserved amount.
authoredTx, err := r.server.cc.Wallet.CreateSimpleTx(
outputs, feeRate, true,
outputs, feeRate, minConfs, true,
)
if err != nil {
return nil, err
@ -989,7 +989,7 @@ func (r *rpcServer) sendCoinsOnChain(paymentMap map[string]int64,
// If that checks out, we're failry confident that creating sending to
// these outputs will keep the wallet balance above the reserve.
tx, err := r.server.cc.Wallet.SendOutputs(
outputs, feeRate, minconf, label,
outputs, feeRate, minConfs, label,
)
if err != nil {
return nil, err
@ -1073,12 +1073,21 @@ func (r *rpcServer) EstimateFee(ctx context.Context,
return nil, err
}
// Then, we'll extract the minimum number of confirmations that each
// output we use to fund the transaction should satisfy.
minConfs, err := lnrpc.ExtractMinConfs(
in.GetMinConfs(), in.GetSpendUnconfirmed(),
)
if err != nil {
return nil, err
}
// We will ask the wallet to create a tx using this fee rate. We set
// dryRun=true to avoid inflating the change addresses in the db.
var tx *txauthor.AuthoredTx
wallet := r.server.cc.Wallet
err = wallet.WithCoinSelectLock(func() error {
tx, err = wallet.CreateSimpleTx(outputs, feePerKw, true)
tx, err = wallet.CreateSimpleTx(outputs, feePerKw, minConfs, true)
return err
})
if err != nil {

@ -87,7 +87,7 @@ func (b *mockBackend) PublishTransaction(tx *wire.MsgTx, _ string) error {
return err
}
func (b *mockBackend) ListUnspentWitnessFromDefaultAccount(minconfirms, maxconfirms int32) (
func (b *mockBackend) ListUnspentWitnessFromDefaultAccount(minConfs, maxConfs int32) (
[]*lnwallet.Utxo, error) {
b.lock.Lock()
defer b.lock.Unlock()

@ -13,10 +13,10 @@ type Wallet interface {
// ListUnspentWitnessFromDefaultAccount returns all unspent outputs
// which are version 0 witness programs from the default wallet account.
// The 'minconfirms' and 'maxconfirms' parameters indicate the minimum
// The 'minConfs' and 'maxConfs' parameters indicate the minimum
// and maximum number of confirmations an output needs in order to be
// returned by this method.
ListUnspentWitnessFromDefaultAccount(minconfirms, maxconfirms int32) (
ListUnspentWitnessFromDefaultAccount(minConfs, maxConfs int32) (
[]*lnwallet.Utxo, error)
// WithCoinSelectLock will execute the passed function closure in a

@ -112,7 +112,7 @@ type mockWallet struct {
Wallet
}
func (m *mockWallet) ListUnspentWitnessFromDefaultAccount(minconfirms, maxconfirms int32) (
func (m *mockWallet) ListUnspentWitnessFromDefaultAccount(minConfs, maxConfs int32) (
[]*lnwallet.Utxo, error) {
return []*lnwallet.Utxo{