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:
4 files changed
+103
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user