Save node list on close
The node list wasn't being saved after removing nodes, so the gateway now calls g.save
in g.Close
. Saving inside g.removeNode
is another option, but I wanted to avoid saving repeatedly when removing many nodes.
TODO: the gateway should ask for more nodes if its node list is getting too sparse.