mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-04 09:58:39 +02:00
lnwallet: add FundingBlob method to LightningChannel
This commit is contained in:
parent
21cb454664
commit
73407be75d
@ -9564,3 +9564,16 @@ func (lc *LightningChannel) LocalCommitmentBlob() fn.Option[tlv.Blob] {
|
||||
return newBlob
|
||||
})(localBalance)
|
||||
}
|
||||
|
||||
// FundingBlob returns the funding custom blob.
|
||||
func (lc *LightningChannel) FundingBlob() fn.Option[tlv.Blob] {
|
||||
lc.RLock()
|
||||
defer lc.RUnlock()
|
||||
|
||||
return fn.MapOption(func(b tlv.Blob) tlv.Blob {
|
||||
newBlob := make([]byte, len(b))
|
||||
copy(newBlob, b)
|
||||
|
||||
return newBlob
|
||||
})(lc.channelState.CustomBlob)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user