diff --git a/lnwallet/channel.go b/lnwallet/channel.go index 067e7375..2c3cfc89 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -1671,7 +1671,8 @@ func (lc *LightningChannel) restoreStateLogs( // entry within the updateLog, so we'll just apply it and move // on. if feeUpdate, ok := logUpdate.UpdateMsg.(*lnwire.UpdateFee); ok { - lc.pendingAckFeeUpdate = &feeUpdate.FeePerKw + newFeeRate := btcutil.Amount(feeUpdate.FeePerKw) + lc.pendingAckFeeUpdate = &newFeeRate continue } @@ -2827,7 +2828,7 @@ func (lc *LightningChannel) createCommitDiff( logUpdates = append(logUpdates, channeldb.LogUpdate{ UpdateMsg: &lnwire.UpdateFee{ ChanID: chanID, - FeePerKw: *lc.pendingFeeUpdate, + FeePerKw: uint32(*lc.pendingFeeUpdate), }, }) } diff --git a/lnwallet/channel_test.go b/lnwallet/channel_test.go index b8b603dc..a53a7c15 100644 --- a/lnwallet/channel_test.go +++ b/lnwallet/channel_test.go @@ -3498,9 +3498,9 @@ func TestChannelRetransmissionFeeUpdate(t *testing.T) { } // 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", - newFeeRate, retransFeeMsg) + uint32(newFeeRate), retransFeeMsg) } // The second, should be a CommitSig message, and be identical to the