diff --git a/include/bitcoin/node/protocols/protocol_explore.hpp b/include/bitcoin/node/protocols/protocol_explore.hpp index 835a3575d..19f0d6398 100644 --- a/include/bitcoin/node/protocols/protocol_explore.hpp +++ b/include/bitcoin/node/protocols/protocol_explore.hpp @@ -54,7 +54,7 @@ class BCN_API protocol_explore enum targets { /// /v[]/block/hash/[bkhash] {1} - /// /v[]/block/height/[height] {1}s + /// /v[]/block/height/[height] {1} block, /// /v[]/block/hash/[bkhash]/filter {1} @@ -66,8 +66,8 @@ class BCN_API protocol_explore header, /// /v[]/transaction/hash/[txhash] {1} - /// /v[]/block/hash/[bkhash]/transaction/[position] {1} - /// /v[]/block/height/[height]/transaction/[position] {1} + /// /v[]/block/hash/[bkhash]/transaction/position/[position] {1} + /// /v[]/block/height/[height]/transaction/position/[position] {1} transaction, /// /v[]/block/hash/[bkhash]/transactions {all txs in the block} diff --git a/src/protocols/protocol_explore.cpp b/src/protocols/protocol_explore.cpp index 81dd09f39..41464fbe2 100644 --- a/src/protocols/protocol_explore.cpp +++ b/src/protocols/protocol_explore.cpp @@ -120,7 +120,7 @@ void protocol_explore::handle_receive_get(const code& ec, { if (const auto ptr = query.get_header(query.to_header(hash))) { - send_json(*request, value_from(*ptr)); + send_json(*request, value_from(ptr)); return; } } @@ -128,7 +128,7 @@ void protocol_explore::handle_receive_get(const code& ec, { if (const auto ptr = query.get_block(query.to_header(hash), wit)) { - send_json(*request, value_from(*ptr)); + send_json(*request, value_from(ptr)); return; } } @@ -136,7 +136,7 @@ void protocol_explore::handle_receive_get(const code& ec, { if (const auto ptr = query.get_transaction(query.to_tx(hash), wit)) { - send_json(*request, value_from(*ptr)); + send_json(*request, value_from(ptr)); return; } } @@ -256,7 +256,7 @@ void protocol_explore::send_text(const request& request, std::string&& hexidecimal) NOEXCEPT { BC_ASSERT_MSG(stranded(), "strand"); - string_response response{ status::ok, request.version() }; + response response{ status::ok, request.version() }; add_common_headers(response, request); response.set(field::content_type, from_mime_type(text)); response.body() = std::move(hexidecimal); @@ -268,7 +268,7 @@ void protocol_explore::send_data(const request& request, data_chunk&& bytes) NOEXCEPT { BC_ASSERT_MSG(stranded(), "strand"); - data_response response{ status::ok, request.version() }; + response response{ status::ok, request.version() }; add_common_headers(response, request); response.set(field::content_type, from_mime_type(data)); response.body() = std::move(bytes); diff --git a/src/protocols/protocol_html.cpp b/src/protocols/protocol_html.cpp index 153251271..5975cc02d 100644 --- a/src/protocols/protocol_html.cpp +++ b/src/protocols/protocol_html.cpp @@ -85,7 +85,7 @@ void protocol_html::send_file(const request& request, file&& file, BC_ASSERT_MSG(stranded(), "strand"); BC_ASSERT_MSG(file.is_open(), "sending closed file handle"); - file_response response{ status::ok, request.version() }; + response response{ status::ok, request.version() }; add_common_headers(response, request); response.set(field::content_type, from_mime_type(type));