lnrpc: add FeeMsat to ForwardingEvent

This commit is contained in:
Sev authored and Olaoluwa Osuntokun committed 2018-12-17 20:13:02 -08:00
1 parent 11c24d3e0f
commit bd8046ca5c
4 files changed
+460 -430

No files matched your search

+3 -1
View File
@@ -4692,6 +4692,7 @@ func (r *rpcServer) ForwardingHistory(ctx context.Context,
for i, event := range timeSlice.ForwardingEvents {
amtInSat := event.AmtIn.ToSatoshis()
amtOutSat := event.AmtOut.ToSatoshis()
feeMsat := event.AmtIn - event.AmtOut
resp.ForwardingEvents[i] = &lnrpc.ForwardingEvent{
Timestamp: uint64(event.Timestamp.Unix()),
@@ -4699,7 +4700,8 @@ func (r *rpcServer) ForwardingHistory(ctx context.Context,
ChanIdOut: event.OutgoingChanID.ToUint64(),
AmtIn: uint64(amtInSat),
AmtOut: uint64(amtOutSat),
Fee: uint64(amtInSat - amtOutSat),
Fee: uint64(feeMsat.ToSatoshis()),
FeeMsat: uint64(feeMsat),
}
}