Currently, the list of banned nodes are only held in memory. A restart of bitcoind would reset the set of banned nodes.
This PR introduces a new filestore (banlist.dat
) which stores the IPs/Subnets of the banned nodes more or less identical to the CAddrDB (peers.dat
).
Also added within this PR is a feature that removes unused banned node entries because the banned_till
time has expired.
includes tests for the banlist disk storage.
Unsure if we should introduce a new cmd arg -storebanlist
to optionally allow storing of banned node data. It could be, that some users expecting a sweep of all banned nodes when they restart bitcoind.