sweep: allow specified outputs to sweep tx
We'll use this to attach an output for the value reserved for anchor commitments fee bumping if the user requests a send_all transaction.
This commit is contained in:
7 files changed
+80
-33
No files matched your search
@@ -288,7 +288,8 @@ func TestCraftSweepAllTxCoinSelectFail(t *testing.T) {
|
||||
utxoLocker := newMockOutpointLocker()
|
||||
|
||||
_, err := CraftSweepAllTx(
|
||||
0, 100, 10, nil, coinSelectLocker, utxoSource, utxoLocker, nil, nil,
|
||||
0, 100, 10, nil, nil, coinSelectLocker, utxoSource,
|
||||
utxoLocker, nil, nil,
|
||||
)
|
||||
|
||||
// Since we instructed the coin select locker to fail above, we should
|
||||
@@ -313,7 +314,8 @@ func TestCraftSweepAllTxUnknownWitnessType(t *testing.T) {
|
||||
utxoLocker := newMockOutpointLocker()
|
||||
|
||||
_, err := CraftSweepAllTx(
|
||||
0, 100, 10, nil, coinSelectLocker, utxoSource, utxoLocker, nil, nil,
|
||||
0, 100, 10, nil, nil, coinSelectLocker, utxoSource,
|
||||
utxoLocker, nil, nil,
|
||||
)
|
||||
|
||||
// Since passed in a p2wsh output, which is unknown, we should fail to
|
||||
@@ -347,8 +349,8 @@ func TestCraftSweepAllTx(t *testing.T) {
|
||||
utxoLocker := newMockOutpointLocker()
|
||||
|
||||
sweepPkg, err := CraftSweepAllTx(
|
||||
0, 100, 10, deliveryAddr, coinSelectLocker, utxoSource, utxoLocker,
|
||||
feeEstimator, signer,
|
||||
0, 100, 10, nil, deliveryAddr, coinSelectLocker, utxoSource,
|
||||
utxoLocker, feeEstimator, signer,
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to make sweep tx: %v", err)
|
||||
|
||||
Reference in new issue
Block a user