lnresearch / topology

Data about the past and current structure of the Lightning Network
MIT License
82 stars 15 forks source link

timemachine: Add support for reconstruction/filtering of missing edges. #19

Open gfrebello opened 1 year ago

gfrebello commented 1 year ago

This PR implements optional correction of channels that only have data for one direction. It can be activated by setting parameter --fix_missing when building the graph, e.g.:

python -m lntopo timemachine restore --fmt=gml --fix_missing=<filter/recover> <gsp.bz2 path> <timestamp>

filter mode removes all channels for which a direction is missing. recover mode attempts to add the missing edges by retrieving data from the 1ML LN explorer. It removes channels for which no data is found. Both modes add a warning at the beginning of the output to inform how many channels were pruned. If no mode is set, the graph will build as in previous versions.

Closes #18.