Closed Impa10r closed 6 months ago
See #2860 and #5884 and discussions there.
I read through that, did not understand the outcome. LND has both timestamp filtering and pagination, works great.
I read through that, did not understand the outcome. LND has both timestamp filtering and pagination, works great.
I opened a PR with code adding this functionality in 2019, it got rejected. Argument was that this is not the right way to do this. See https://github.com/ElementsProject/lightning/pull/5884#issuecomment-1377901823 .
Yes, I saw two PRs rejected. I am asking the devs what the right way is to poll incremental history.
use the status + index + start +limit fields: https://docs.corelightning.org/reference/lightning-listforwards, i do this i my summars plugin to only pull things in the last x hours. Just have to remember the index where you looked last time.
use the status + index + start +limit fields: https://docs.corelightning.org/reference/lightning-listforwards, i do this i my summars plugin to only pull things in the last x hours. Just have to remember the index where you looked last time.
Oh, thanks a lot! Neither lightning-cli listforwards --help
nor glighitning library has this mentioned! Got it to work like this: lightning-cli listforwards -k status="settled" index="created" start=10
Issue and Steps to Reproduce
Currently
lighting-cli listforwards
and the respective API endpoints take no parameters and return the whole history of htlc forwards, including pending and failed ones. On a sufficiently large node with a long history of routing this may take a while. If some script would like to monitor new forwards in the last minute etc, the whole history needs to be downloaded again every minute. Unless I am missing some obvious solution, please allow incremental history retrieval.Another optional parameter would be to only return successful forwards.
getinfo
output"version": "v24.02.2",