Skip to content

Commit 8a07107

Browse files
committed
sweepbatcher: make sure dest pkscript is filled
1 parent 8c784ef commit 8a07107

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sweepbatcher/sweep_batch.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,10 @@ func constructUnsignedTx(sweeps []sweep, address btcutil.Address,
12851285
return nil, 0, 0, 0, fmt.Errorf("txscript.PayToAddrScript "+
12861286
"failed: %w", err)
12871287
}
1288+
if len(batchPkScript) == 0 {
1289+
return nil, 0, 0, 0, fmt.Errorf("txscript.PayToAddrScript " +
1290+
"returned an empty pkScript")
1291+
}
12881292

12891293
// Add the output to weight estimates.
12901294
err = sweeppkg.AddOutputEstimate(&weightEstimate, address)

0 commit comments

Comments
 (0)