Add a maxconfirms argument to ListUnspentWitness
This change was inspired by #1984 - the underlying call to ListUnspent supports a (min, max) range so it makes sense that the WalletController interface can also support this; a default no-maximum can be expressed using a MaxInt32 value.
This commit is contained in:
4 files changed
+14
-10
No files matched your search
@@ -234,7 +234,8 @@ func (*mockWalletController) SendOutputs(outputs []*wire.TxOut,
|
||||
|
||||
// ListUnspentWitness is called by the wallet when doing coin selection. We just
|
||||
// need one unspent for the funding transaction.
|
||||
func (m *mockWalletController) ListUnspentWitness(confirms int32) ([]*lnwallet.Utxo, error) {
|
||||
func (m *mockWalletController) ListUnspentWitness(minconfirms,
|
||||
maxconfirms int32) ([]*lnwallet.Utxo, error) {
|
||||
utxo := &lnwallet.Utxo{
|
||||
AddressType: lnwallet.WitnessPubKey,
|
||||
Value: btcutil.Amount(10 * btcutil.SatoshiPerBitcoin),
|
||||
|
||||
Reference in new issue
Block a user