sweep,rpc: honor minConfs paramater when SendAll is set

This commit is contained in:
Juan Pablo Civile committed 2021-04-12 15:58:43 -03:00
1 parent 213b264e4c
commit 09c4ff509d
3 files changed
+7 -5

No files matched your search

+2 -2
View File
@@ -169,7 +169,7 @@ func CraftSweepAllTx(feeRate chainfee.SatPerKWeight, dustLimit btcutil.Amount,
blockHeight uint32, deliveryAddrs []DeliveryAddr, changeAddr btcutil.Address,
coinSelectLocker CoinSelectionLocker, utxoSource UtxoSource,
outpointLocker OutpointLocker, feeEstimator chainfee.Estimator,
signer input.Signer) (*WalletSweepPackage, error) {
signer input.Signer, minConfs int32) (*WalletSweepPackage, error) {
// TODO(roasbeef): turn off ATPL as well when available?
@@ -194,7 +194,7 @@ func CraftSweepAllTx(feeRate chainfee.SatPerKWeight, dustLimit btcutil.Amount,
// operations are going on, we can grab a clean snapshot of the
// current UTXO state of the wallet.
utxos, err := utxoSource.ListUnspentWitnessFromDefaultAccount(
1, math.MaxInt32,
minConfs, math.MaxInt32,
)
if err != nil {
return err