diff --git a/include/xrpl/protocol/detail/b58_utils.h b/include/xrpl/protocol/detail/b58_utils.h index 960b3d8dcb6..76e470f54e7 100644 --- a/include/xrpl/protocol/detail/b58_utils.h +++ b/include/xrpl/protocol/detail/b58_utils.h @@ -177,7 +177,8 @@ inplace_bigint_div_rem(std::span numerator, std::uint64_t divisor) [[nodiscard]] inline std::array b58_10_to_b58_be(std::uint64_t input) { - constexpr std::uint64_t B_58_10 = 430804206899405824; // 58^10; + [[maybe_unused]] static constexpr std::uint64_t B_58_10 = + 430804206899405824; // 58^10; ASSERT( input < B_58_10, "ripple::b58_fast::detail::b58_10_to_b58_be : valid input"); diff --git a/src/test/protocol/types_test.cpp b/src/test/protocol/types_test.cpp index ac4314df640..8257d9c6495 100644 --- a/src/test/protocol/types_test.cpp +++ b/src/test/protocol/types_test.cpp @@ -28,8 +28,16 @@ struct types_test : public beast::unit_test::suite testAccountID() { auto const s = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"; - if (BEAST_EXPECT(parseBase58(s))) - BEAST_EXPECT(toBase58(*parseBase58(s)) == s); + if (auto const parsed = parseBase58(s); BEAST_EXPECT(parsed)) + { + BEAST_EXPECT(toBase58(*parsed) == s); + } + + { + auto const s = + "âabcd1rNxp4h8apvRis6mJf9Sh8C6iRxfrDWNâabcdAVâ\xc2\x80\xc2\x8f"; + BEAST_EXPECT(!parseBase58(s)); + } } void