mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 12:01:27 +02:00
input: add new Preimage method to input.Input
In this commit, we add a new method to obtain an option of a preimage to the input.Input struct. This is useful for callers that have an Input, and want to optionally obtain the preimage.
This commit is contained in:
committed by
Oliver Gugger
parent
e3eef0adff
commit
413fdaf3fb
@@ -1160,6 +1160,11 @@ func (bo *breachedOutput) SignDesc() *input.SignDescriptor {
|
||||
return &bo.signDesc
|
||||
}
|
||||
|
||||
// Preimage returns the preimage that was used to create the breached output.
|
||||
func (bo *breachedOutput) Preimage() fn.Option[lntypes.Preimage] {
|
||||
return fn.None[lntypes.Preimage]()
|
||||
}
|
||||
|
||||
// CraftInputScript computes a valid witness that allows us to spend from the
|
||||
// breached output. It does so by first generating and memoizing the witness
|
||||
// generation function, which parameterized primarily by the witness type and
|
||||
|
Reference in New Issue
Block a user