File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,12 @@ static hash_cptr to_hash(const std::string_view& token) NOEXCEPT
4646 emplace_shared<const hash_digest>(std::move (out)) : hash_cptr{};
4747}
4848
49- static hash_cptr to_base16 (const std::string_view& token) NOEXCEPT
50- {
51- hash_digest out{};
52- return decode_base16 (out, token) ?
53- emplace_shared<const hash_digest>(std::move (out)) : hash_cptr{};
54- }
49+ // // static hash_cptr to_base16(const std::string_view& token) NOEXCEPT
50+ // // {
51+ // // hash_digest out{};
52+ // // return decode_base16(out, token) ?
53+ // // emplace_shared<const hash_digest>(std::move(out)) : hash_cptr{};
54+ // // }
5555
5656code parse_target (request_t & out, const std::string_view& path) NOEXCEPT
5757{
@@ -100,8 +100,8 @@ code parse_target(request_t& out, const std::string_view& path) NOEXCEPT
100100 if (segment == segments.size ())
101101 return error::missing_hash;
102102
103- // address hash is a single sha256, and conventionally not reversed .
104- const auto base16 = to_base16 (segments[segment++]);
103+ // address hash is a single sha256, in reversed display endianness .
104+ const auto base16 = to_hash (segments[segment++]);
105105 if (!base16) return error::invalid_hash;
106106
107107 params[" hash" ] = base16;
Original file line number Diff line number Diff line change @@ -847,9 +847,9 @@ BOOST_AUTO_TEST_CASE(parse__parse_target__output_spenders_extra_segment__extra_s
847847
848848// address
849849
850- BOOST_AUTO_TEST_CASE (parse__parse_target__address_valid__unreversed_expected )
850+ BOOST_AUTO_TEST_CASE (parse__parse_target__address_valid__reversed_expected )
851851{
852- const std::string path = " /v255/address/4200000000000000000000000000000000000000000000000000000000000000 " ;
852+ const std::string path = " /v255/address/0000000000000000000000000000000000000000000000000000000000000042 " ;
853853
854854 request_t request{};
855855 BOOST_REQUIRE (!parse_target (request, path));
You can’t perform that action at this time.
0 commit comments