Skip to content

persist inbound info together with node address

Glen De Cauwsemaecker requested to merge GlenDC:persist-outbound-peers into master

I'm not sure if my execution is perfect here, but the idea is there. Feedback needed I think. The goal is to store the inbound information along with the NetAddress, rather then just the NetAddress.

First I thought a small change could be done, where I'm just serializing the current outbound peers. However the problem is that all peers are disconnected before we serialize, thus that is not possible. Than I noticed that while we do store the nodes, we were storing them as empty structs, so why not store some extra information along with it?

This approach does mean that the update is a bit more invasive than intended, but should still be safe for merging once we agree on all modifications.

I also bumped the gateway persist version, as the format changed a bit. I do support the previous version, so that this node information is not lost after the upgrade.

Merge request reports