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
@@ -5,6 +5,7 @@ import (
"crypto/sha256"
"errors"
"fmt"
"math"
"net"
"sync"
"sync/atomic"
@@ -1276,7 +1277,7 @@ func (l *LightningWallet) selectCoinsAndChange(feeRate SatPerKWeight,
// Find all unlocked unspent witness outputs that satisfy the minimum
// number of confirmations required.
coins, err := l.ListUnspentWitness(minConfs)
coins, err := l.ListUnspentWitness(minConfs, math.MaxInt32)
if err != nil {
return err
}