sweep: add a dedicated method to create sweeping txns
This takes the old `createSweepTx` and refactors it to be sweep-specific. A sweeping txns differs from a normal tx as it doesn't need to take outputs as params.
This commit is contained in:
4 files changed
+269
-7
No files matched your search
@@ -273,7 +273,11 @@ func getWeightEstimate(inputs []input.Input, outputs []*wire.TxOut,
|
||||
|
||||
err := weightEstimate.add(inp)
|
||||
if err != nil {
|
||||
log.Warn(err)
|
||||
// TODO(yy): check if this is even possible? If so, we
|
||||
// should return the error here instead of filtering!
|
||||
log.Errorf("Failed to get weight estimate for "+
|
||||
"input=%v, witnessType=%v: %v ", inp.OutPoint(),
|
||||
inp.WitnessType(), err)
|
||||
|
||||
// Skip inputs for which no weight estimate can be
|
||||
// given.
|
||||
|
||||
Reference in new issue
Block a user