diff options
Diffstat (limited to 'src/index/coinstatsindex.cpp')
-rw-r--r-- | src/index/coinstatsindex.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/index/coinstatsindex.cpp b/src/index/coinstatsindex.cpp index c7c1f4b533..7c8b2b186e 100644 --- a/src/index/coinstatsindex.cpp +++ b/src/index/coinstatsindex.cpp @@ -12,9 +12,9 @@ #include <undo.h> #include <validation.h> -static constexpr char DB_BLOCK_HASH = 's'; -static constexpr char DB_BLOCK_HEIGHT = 't'; -static constexpr char DB_MUHASH = 'M'; +static constexpr uint8_t DB_BLOCK_HASH{'s'}; +static constexpr uint8_t DB_BLOCK_HEIGHT{'t'}; +static constexpr uint8_t DB_MUHASH{'M'}; namespace { @@ -66,7 +66,7 @@ struct DBHeightKey { template <typename Stream> void Unserialize(Stream& s) { - char prefix{static_cast<char>(ser_readdata8(s))}; + const uint8_t prefix{ser_readdata8(s)}; if (prefix != DB_BLOCK_HEIGHT) { throw std::ios_base::failure("Invalid format for coinstatsindex DB height key"); } @@ -81,7 +81,7 @@ struct DBHashKey { SERIALIZE_METHODS(DBHashKey, obj) { - char prefix{DB_BLOCK_HASH}; + uint8_t prefix{DB_BLOCK_HASH}; READWRITE(prefix); if (prefix != DB_BLOCK_HASH) { throw std::ios_base::failure("Invalid format for coinstatsindex DB hash key"); |