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
8 changes: 8 additions & 0 deletions include/bitcoin/network/impl/channels/channel_rpc.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ inline void CLASS::handle_receive(const code& ec, size_t bytes,
return;
}

// TODO: Extend support to batch (array of rpc).
// TODO: This would consist of asynchronous recursion here, with iteration
// TODO: over the message array. The response is accumulated, but there is
// TODO: no way we would buffer it at the server until complete, which is a
// TODO: clear DoS vector. We would instead track the iteration and send
// TODO: each response with the necessary delimiters. This allows a request
// TODO: to safely be of any configured byte size or request element count.

// Save response state.
identity_ = request->message.id;
version_ = request->message.jsonrpc;
Expand Down
6 changes: 6 additions & 0 deletions src/channels/channel_http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ void channel_http::receive() NOEXCEPT
if (stopped() || paused() || reading_)
return;

// TODO: Extend support to batch (array of rpc).
// TODO: See notes in channel_rpc.ipp. This is the same except there must
// TODO: be an set of socket methods for incremental http-rpc. This can
// TODO: be handled by writing the header, whole rpc responses, and close.
// TODO: Boost beast provides these independent async calls for chunking.

reading_ = true;
const auto in = to_shared<request>();

Expand Down
1 change: 1 addition & 0 deletions src/messages/rpc/body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ finish(boost_code& ec) NOEXCEPT

try
{
// TODO: extend support to batch (array of rpc).
value_.message = value_to<rpc::request_t>(value_.model);
value_.model.emplace_null();
}
Expand Down
Loading