From 49510d775fe5f016952052af4a1dd38c1e88adf4 Mon Sep 17 00:00:00 2001 From: t4sk Date: Thu, 12 Apr 2018 14:24:03 +0800 Subject: [PATCH] rpcserver: include millisatoshis in marshallRoute --- rpcserver.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/rpcserver.go b/rpcserver.go index dbf8afc4..8ebf61e9 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2745,16 +2745,20 @@ func marshallRoute(route *routing.Route) *lnrpc.Route { resp := &lnrpc.Route{ TotalTimeLock: route.TotalTimeLock, TotalFees: int64(route.TotalFees.ToSatoshis()), + TotalFeesMsat: int64(route.TotalFees), TotalAmt: int64(route.TotalAmount.ToSatoshis()), + TotalAmtMsat: int64(route.TotalAmount), Hops: make([]*lnrpc.Hop, len(route.Hops)), } for i, hop := range route.Hops { resp.Hops[i] = &lnrpc.Hop{ - ChanId: hop.Channel.ChannelID, - ChanCapacity: int64(hop.Channel.Capacity), - AmtToForward: int64(hop.AmtToForward.ToSatoshis()), - Fee: int64(hop.Fee.ToSatoshis()), - Expiry: uint32(hop.OutgoingTimeLock), + ChanId: hop.Channel.ChannelID, + ChanCapacity: int64(hop.Channel.Capacity), + AmtToForward: int64(hop.AmtToForward.ToSatoshis()), + AmtToForwardMsat: int64(hop.AmtToForward), + Fee: int64(hop.Fee.ToSatoshis()), + FeeMsat: int64(hop.Fee), + Expiry: uint32(hop.OutgoingTimeLock), } }