During the creation of the filtered_graph it removes all channels below 500k, EXCEPT if they are neighbors of pub_key.
This makes it impossible to re-use this same graph for other nodes (when running the main code in a loop), since it is now specific to one particular node.
It would be much better if these neighbors were not added tofiltered_graph but instead to the graph.copy() later on in the processing.
During the creation of the
filtered_graphit removes all channels below 500k, EXCEPT if they are neighbors ofpub_key.This makes it impossible to re-use this same graph for other nodes (when running the main code in a loop), since it is now specific to one particular node.
It would be much better if these neighbors were not added to
filtered_graphbut instead to thegraph.copy()later on in the processing.