mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 09:03:10 +02:00
lnwallet/channel: add lnwire<->PaymentDescriptor FeeUpdate conversion
This commit adds conversion between the lnwire.UpdateFee message and the new FeeUpdate PaymentDescriptor. We re-purpose the existing Amount field in the PaymentDescriptor stuct to hold the feerate.
This commit is contained in:
@@ -1781,9 +1781,14 @@ func (s *Switch) loadChannelFwdPkgs(source lnwire.ShortChannelID) ([]*channeldb.
|
||||
// NOTE: This should mimic the behavior processRemoteSettleFails.
|
||||
func (s *Switch) reforwardSettleFails(fwdPkgs []*channeldb.FwdPkg) {
|
||||
for _, fwdPkg := range fwdPkgs {
|
||||
settleFails := lnwallet.PayDescsFromRemoteLogUpdates(
|
||||
settleFails, err := lnwallet.PayDescsFromRemoteLogUpdates(
|
||||
fwdPkg.Source, fwdPkg.Height, fwdPkg.SettleFails,
|
||||
)
|
||||
if err != nil {
|
||||
log.Errorf("Unable to process remote log updates: %v",
|
||||
err)
|
||||
continue
|
||||
}
|
||||
|
||||
switchPackets := make([]*htlcPacket, 0, len(settleFails))
|
||||
for i, pd := range settleFails {
|
||||
|
Reference in New Issue
Block a user