diff --git a/include/bitcoin/database/impl/query/merkle.ipp b/include/bitcoin/database/impl/query/merkle.ipp index da8adb424..1cd5f7448 100644 --- a/include/bitcoin/database/impl/query/merkle.ipp +++ b/include/bitcoin/database/impl/query/merkle.ipp @@ -67,7 +67,7 @@ hash_digest CLASS::get_merkle_root(size_t height) const NOEXCEPT // static/protected TEMPLATE -CLASS::positions CLASS::merkle_branch(size_t leaf, size_t leaves, +positions CLASS::merkle_branch(size_t leaf, size_t leaves, bool compress) NOEXCEPT { using namespace system; diff --git a/include/bitcoin/database/query.hpp b/include/bitcoin/database/query.hpp index e22917ffa..1688fa4a0 100644 --- a/include/bitcoin/database/query.hpp +++ b/include/bitcoin/database/query.hpp @@ -787,8 +787,6 @@ class query /// merkle /// ----------------------------------------------------------------------- - struct position { size_t sibling; size_t width; }; - using positions = std::vector; // merkle related utilities static hash_digest partial_subroot(hashes&& tree, size_t span) NOEXCEPT; diff --git a/include/bitcoin/database/types.hpp b/include/bitcoin/database/types.hpp index 8dcf4540e..84b843bac 100644 --- a/include/bitcoin/database/types.hpp +++ b/include/bitcoin/database/types.hpp @@ -81,6 +81,9 @@ using counts = std::pair; using sizes = std::pair; using heights = std_vector; +struct position { size_t sibling; size_t width; }; +using positions = std::vector; + struct header_state { header_link link; code ec; }; using header_states = std::vector; diff --git a/test/query/merkle.cpp b/test/query/merkle.cpp index 204c9f14a..0c01a2bae 100644 --- a/test/query/merkle.cpp +++ b/test/query/merkle.cpp @@ -40,7 +40,6 @@ class merkle_accessor { public: using base = test::query_accessor; - using positions = base::positions; using base::base; using base::merkle_branch; using base::interval_span; @@ -113,7 +112,7 @@ BOOST_AUTO_TEST_CASE(query_merkle___merkle_branch__seven__six_four_and_zero) BOOST_AUTO_TEST_CASE(block__merkle_branch__medium_power_of_two__expected) { - const merkle_accessor::positions expected{ { 14, 1 }, { 6, 2 }, { 2, 4 }, { 0, 8 } }; + const positions expected{ { 14, 1 }, { 6, 2 }, { 2, 4 }, { 0, 8 } }; auto branch = merkle_accessor::merkle_branch(15, 16, true); BOOST_REQUIRE_EQUAL(branch.size(), 4u);