sweep+input: add RequiredLockTime to inputs

This commit is contained in:
Johan T. Halseth committed 2020-11-20 13:06:53 +01:00
1 parent fa4fd02cf1
commit efd6bc9501
5 files changed
+251 -17

No files matched your search

+11
View File
@@ -15,6 +15,10 @@ type Input interface {
// construct the corresponding transaction input.
OutPoint() *wire.OutPoint
// RequiredLockTime returns whether this input commits to a tx locktime
// that must be used in the transaction including it.
RequiredLockTime() (uint32, bool)
// WitnessType returns an enum specifying the type of witness that must
// be generated in order to spend this output.
WitnessType() WitnessType
@@ -75,6 +79,13 @@ func (i *inputKit) OutPoint() *wire.OutPoint {
return &i.outpoint
}
// RequiredLockTime returns whether this input commits to a tx locktime that
// must be used in the transaction including it. This will be false for the
// base input type since we can re-sign for any lock time.
func (i *inputKit) RequiredLockTime() (uint32, bool) {
return 0, false
}
// WitnessType returns the type of witness that must be generated to spend the
// breached output.
func (i *inputKit) WitnessType() WitnessType {