lnrpc: add FeeMsat to ForwardingEvent

This commit is contained in:
Sev
2018-11-13 19:22:12 +02:00
committed by Olaoluwa Osuntokun
parent 11c24d3e0f
commit bd8046ca5c
4 changed files with 460 additions and 430 deletions

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),
}
}