mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
p2p: Avoid InitError when downgrading peers.dat
fixes #24188 When downgrading, a peers.dat with a future version that has a minimum required version larger than the downgraded version would cause an InitError. This commit changes this behavior to overwrite the existing peers.dat with a new empty one, while creating a backup in peers.dat.bak.
This commit is contained in:
@@ -17,6 +17,12 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
class InvalidAddrManVersionError : public std::ios_base::failure
|
||||
{
|
||||
public:
|
||||
InvalidAddrManVersionError(std::string msg) : std::ios_base::failure(msg) { }
|
||||
};
|
||||
|
||||
class AddrManImpl;
|
||||
|
||||
/** Default for -checkaddrman */
|
||||
|
||||
Reference in New Issue
Block a user