Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/bitcoin/node/protocols/protocol_explore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
Expand Down
10 changes: 5 additions & 5 deletions src/protocols/protocol_explore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,23 +120,23 @@ 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;
}
}
else if (bk)
{
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;
}
}
else
{
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;
}
}
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/protocols/protocol_html.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Loading