channeldb: add NextHeight, fix formatting

This commit is contained in:
Oliver Gugger 2024-05-27 13:36:01 +02:00
parent f9debb148b
commit b35dae72a5
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

View File

@ -4544,6 +4544,7 @@ func (lc *LightningChannel) computeView(view *HtlcView,
// need this to determine which HTLCs are dust, and also the final fee
// rate.
view.FeePerKw = commitChain.tip().feePerKw
view.NextHeight = nextHeight
// We evaluate the view at this stage, meaning settled and failed HTLCs
// will remove their corresponding added HTLCs. The resulting filtered
@ -5992,8 +5993,9 @@ func (lc *LightningChannel) ReceiveHTLC(htlc *lnwire.UpdateAddHTLC) (uint64,
defer lc.Unlock()
if htlc.ID != lc.updateLogs.Remote.htlcCounter {
return 0, fmt.Errorf("ID %d on HTLC add does not match expected next "+
"ID %d", htlc.ID, lc.updateLogs.Remote.htlcCounter)
return 0, fmt.Errorf("ID %d on HTLC add does not match "+
"expected next ID %d", htlc.ID,
lc.updateLogs.Remote.htlcCounter)
}
pd := &paymentDescriptor{