sweep/input: adds NewBaseInput to return reference

This commit is contained in:
Conner Fromknecht 2019-02-05 18:27:07 -08:00
parent 8ac5f2bb17
commit f1f52410ab
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -95,6 +95,18 @@ func MakeBaseInput(outpoint *wire.OutPoint, witnessType WitnessType,
}
}
// NewBaseInput allocates and assembles a new *BaseInput that can be used to
// construct a sweep transaction.
func NewBaseInput(outpoint *wire.OutPoint, witnessType WitnessType,
signDescriptor *SignDescriptor, heightHint uint32) *BaseInput {
input := MakeBaseInput(
outpoint, witnessType, signDescriptor, heightHint,
)
return &input
}
// CraftInputScript returns a valid set of input scripts allowing this output
// to be spent. The returns input scripts should target the input at location
// txIndex within the passed transaction. The input scripts generated by this