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:59 -05:00
1 parent 971ac5a14d
commit fccd984ac1
1 file changed
+1 -1
+1 -1
View File
@@ -3857,7 +3857,7 @@ func (p *Brontide) initRbfChanCloser(
spendEvent := protofsm.RegisterSpend[chancloser.ProtocolEvent]{
OutPoint: channel.ChannelPoint(),
PkScript: channel.FundingTxOut().PkScript,
HeightHint: scid.BlockHeight,
HeightHint: channel.DeriveHeightHint(),
PostSpendEvent: fn.Some[chancloser.RbfSpendMapper](
chancloser.SpendMapper,
),