lightningj-org/lightningj

`QueryRoutes` always returns an empty route list

Closed this issue · 3 comments

Subject of the issue

The logs show that LND returned a correct response, but the response has an empty route list.

After some debugging, the method QueryRoutesReponse.populateRepeatedFields is being called by a log line inside SynchronousAPI.processResponse. That method is clearing the route list in the builder, and then repopulating it with whatever routes has but at this point in the responses lifetime, that variables hasn't been initialized yet. Moving the line that calls clearRoutes inside the if would fix the issue.

Your environment

  • v0.8.1-Beta
  • Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
  • macOS

Steps to reproduce

Call query routes for a known reachable destination

Expected behaviour

The routes should be parsed.

Actual behaviour

An empty list is returned.

Hi, I will look at this later today and see if I can reproduce it. I will include a fix into upcoming 0.8.2 release. I will get back.

Hi again, I have submitted a fix. The problem was that lists were cleared when converting to JSON incorrectly. It will be included in 0.8.2 released soon.

@herrvendil thanks for the quick response! The fix looks good.