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
+2
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user