multi: extract new DeriveHeightHint() function, use for new rbf closer

With this commit, we make sure we set the right height hint, even if the
channel is a zero conf channel.
This commit is contained in:
Olaoluwa Osuntokun committed 2025-03-18 11:44:20 -05:00
1 parent b2794b07cb
commit 8432e706d3
3 files changed
+37 -29

No files matched your search

+8
View File
@@ -9874,6 +9874,14 @@ func (lc *LightningChannel) FundingTxOut() *wire.TxOut {
return &lc.fundingOutput
}
// DeriveHeightHint derives the block height for the channel opening.
func (lc *LightningChannel) DeriveHeightHint() uint32 {
lc.RLock()
defer lc.RUnlock()
return lc.channelState.DeriveHeightHint()
}
// MultiSigKeys returns the set of multi-sig keys for an channel.
func (lc *LightningChannel) MultiSigKeys() (keychain.KeyDescriptor,
keychain.KeyDescriptor) {