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