Skip to content

Commit f1f5241

Browse files
committed
sweep/input: adds NewBaseInput to return reference
1 parent 8ac5f2b commit f1f5241

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

input/input.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,18 @@ func MakeBaseInput(outpoint *wire.OutPoint, witnessType WitnessType,
9595
}
9696
}
9797

98+
// NewBaseInput allocates and assembles a new *BaseInput that can be used to
99+
// construct a sweep transaction.
100+
func NewBaseInput(outpoint *wire.OutPoint, witnessType WitnessType,
101+
signDescriptor *SignDescriptor, heightHint uint32) *BaseInput {
102+
103+
input := MakeBaseInput(
104+
outpoint, witnessType, signDescriptor, heightHint,
105+
)
106+
107+
return &input
108+
}
109+
98110
// CraftInputScript returns a valid set of input scripts allowing this output
99111
// to be spent. The returns input scripts should target the input at location
100112
// txIndex within the passed transaction. The input scripts generated by this

0 commit comments

Comments
 (0)