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 2025-02-10 19:05:52 -08:00
parent 971ac5a14d
commit fccd984ac1

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,
),