mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
addrman: Fix format string in deserialize error
Also add a regression test.
This commit is contained in:
parent
facce4ca44
commit
fab0b55cf0
3 changed files with 91 additions and 3 deletions
|
|
@ -242,9 +242,9 @@ void CAddrMan::Unserialize(Stream& s_)
|
|||
const uint8_t lowest_compatible = compat - INCOMPATIBILITY_BASE;
|
||||
if (lowest_compatible > FILE_FORMAT) {
|
||||
throw std::ios_base::failure(strprintf(
|
||||
"Unsupported format of addrman database: %u. It is compatible with formats >=%u, "
|
||||
"but the maximum supported by this version of %s is %u.",
|
||||
format, lowest_compatible, PACKAGE_NAME, static_cast<uint8_t>(FILE_FORMAT)));
|
||||
"Unsupported format of addrman database: %u. It is compatible with formats >=%u, "
|
||||
"but the maximum supported by this version of %s is %u.",
|
||||
uint8_t{format}, uint8_t{lowest_compatible}, PACKAGE_NAME, uint8_t{FILE_FORMAT}));
|
||||
}
|
||||
|
||||
s >> nKey;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue