Skip to content

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Jun 24, 2020

The channelstats API only returns results for the outgoing channels used when relaying.
It is misleading for users that the incoming channels aren't included in that API's results: they may incorrectly conclude that the incoming channels have no activity and should be closed.

This PR raises a couple questions though:

  • I chose to attribute the fee only to the outgoing channel: maybe we should also reflect it in the incoming channel, since that channel participated in getting us this fee? But then if you sum the fees from all the results of the channelstats the result would be twice the fees you really collected, which may be an issue.
  • I changed the trampoline behaviour regarding the amount reported compared to before: I now only take into account the amount that goes through this channel whereas before we used the total payment amount. Which one do you think is better?

Maybe those questions indicate that we should do more in-depth changes to that API, but now is probably not the right time for that.

Fixes #1465

The channelstats API only returns results for the *outgoing* channels
used when relaying. We must also include the *incoming* channels, otherwise
it looks like they're inactive which doesn't reflect their real usage.

Fixes #1465
@t-bast t-bast requested a review from pm47 June 24, 2020 09:21
@t-bast t-bast merged commit 7ec3ba8 into master Jun 30, 2020
@t-bast t-bast deleted the fix-channel-stats-for-real-plz branch June 30, 2020 15:11
@t-bast t-bast mentioned this pull request Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

channelstats API doesn't reflect incoming HTLCs

3 participants