diff --git a/src/side_chain.cpp b/src/side_chain.cpp index 6b5611b..155d312 100644 --- a/src/side_chain.cpp +++ b/src/side_chain.cpp @@ -1169,8 +1169,10 @@ void SideChain::prune_seen_data() } }; - prune(m_seenWallets, 72 * 3600); - prune(m_seenOnionPubkeys, 12 * 3600); + constexpr uint64_t hour = 3600; + + prune(m_seenWallets, 72 * hour); + prune(m_seenOnionPubkeys, 12 * hour); m_seenWalletsLastPruneTime = cur_time; } diff --git a/src/util.cpp b/src/util.cpp index 30e9fb3..299272c 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -957,7 +957,7 @@ std::string to_onion_v3(const hash& pubkey) static constexpr uint8_t version = 3; hash h; - keccak_custom([&pubkey](int offset) { + keccak_custom([&pubkey](int offset) -> uint8_t { size_t k = static_cast(offset); if (k < sizeof(prefix) - 1) { return prefix[k];