lnwallet/chanfunding: add Inputs/Outputs to assemblers

This will be used to try to estimate how much the funding transaction
will decrease our wallet balance.
This commit is contained in:
Johan T. Halseth committed 2021-01-19 10:53:45 +01:00
1 parent b2857bf392
commit 4a4e0c73f7
4 files changed
+103

No files matched your search

+24
View File
@@ -98,6 +98,30 @@ func (s *ShimIntent) ThawHeight() uint32 {
return s.thawHeight
}
// Inputs returns all inputs to the final funding transaction that we
// know about. For the ShimIntent this will always be none, since it is funded
// externally.
func (s *ShimIntent) Inputs() []wire.OutPoint {
return nil
}
// Outputs returns all outputs of the final funding transaction that we
// know about. Since this is an externally funded channel, the channel output
// is the only known one.
func (s *ShimIntent) Outputs() []*wire.TxOut {
_, txOut, err := s.FundingOutput()
if err != nil {
log.Warnf("Unable to find funding output for shim intent: %v",
err)
// Failed finding funding output, return empty list of known
// outputs.
return nil
}
return []*wire.TxOut{txOut}
}
// FundingKeys couples our multi-sig key along with the remote party's key.
type FundingKeys struct {
// LocalKey is our multi-sig key.