aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-09-03 16:44:58 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-09-05 10:26:03 +0200
commitfab0b55cf060c2b14fae5cee13f0a2dcaebde892 (patch)
tree98a325993a82a9f45fb39755a204d996c6e96d70 /src
parentfacce4ca44bc206b7656e297a7fa5dfb83a01012 (diff)
downloadbitcoin-fab0b55cf060c2b14fae5cee13f0a2dcaebde892.tar.xz
addrman: Fix format string in deserialize error
Also add a regression test.
Diffstat (limited to 'src')
-rw-r--r--src/addrman.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp
index 48e79c64ed..6313804596 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -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;