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:
AdamISZ committed 2018-10-28 15:55:18 +01:00
1 parent eaba39d20e
commit 567306b010
4 files changed
+14 -10

No files matched your search

+2 -1
View File
@@ -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),