lnwallet: update UpdateFee msg usage to latest API changes
This commit is contained in:
parent
4bec706b11
commit
c27e87f168
@ -1671,7 +1671,8 @@ func (lc *LightningChannel) restoreStateLogs(
|
|||||||
// entry within the updateLog, so we'll just apply it and move
|
// entry within the updateLog, so we'll just apply it and move
|
||||||
// on.
|
// on.
|
||||||
if feeUpdate, ok := logUpdate.UpdateMsg.(*lnwire.UpdateFee); ok {
|
if feeUpdate, ok := logUpdate.UpdateMsg.(*lnwire.UpdateFee); ok {
|
||||||
lc.pendingAckFeeUpdate = &feeUpdate.FeePerKw
|
newFeeRate := btcutil.Amount(feeUpdate.FeePerKw)
|
||||||
|
lc.pendingAckFeeUpdate = &newFeeRate
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2827,7 +2828,7 @@ func (lc *LightningChannel) createCommitDiff(
|
|||||||
logUpdates = append(logUpdates, channeldb.LogUpdate{
|
logUpdates = append(logUpdates, channeldb.LogUpdate{
|
||||||
UpdateMsg: &lnwire.UpdateFee{
|
UpdateMsg: &lnwire.UpdateFee{
|
||||||
ChanID: chanID,
|
ChanID: chanID,
|
||||||
FeePerKw: *lc.pendingFeeUpdate,
|
FeePerKw: uint32(*lc.pendingFeeUpdate),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -3498,9 +3498,9 @@ func TestChannelRetransmissionFeeUpdate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The fee should match exactly the new fee update we applied above.
|
// The fee should match exactly the new fee update we applied above.
|
||||||
if retransFeeMsg.FeePerKw != newFeeRate {
|
if retransFeeMsg.FeePerKw != uint32(newFeeRate) {
|
||||||
t.Fatalf("fee update doesn't match: expected %v, got %v",
|
t.Fatalf("fee update doesn't match: expected %v, got %v",
|
||||||
newFeeRate, retransFeeMsg)
|
uint32(newFeeRate), retransFeeMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
// The second, should be a CommitSig message, and be identical to the
|
// The second, should be a CommitSig message, and be identical to the
|
||||||
|
Loading…
Reference in New Issue
Block a user