@@ -30,17 +30,22 @@ namespace node {
3030
3131class BCN_API protocol_bitcoind_rpc
3232 : public node::protocol_http,
33+ public network::protocol_http,
3334 protected network::tracker<protocol_bitcoind_rpc>
3435{
3536public:
37+ // Replace base class channel_t (network::channel_http).
38+ using channel_t = node::channel_http;
39+
3640 typedef std::shared_ptr<protocol_bitcoind_rpc> ptr;
3741 using rpc_interface = interface::bitcoind_rpc;
3842 using rpc_dispatcher = network::rpc::dispatcher<rpc_interface>;
3943
4044 inline protocol_bitcoind_rpc (const auto & session,
4145 const network::channel::ptr& channel,
4246 const options_t & options) NOEXCEPT
43- : node::protocol_http(session, channel, options),
47+ : node::protocol_http(session, channel),
48+ network::protocol_http(session, channel, options),
4449 network::tracker<protocol_bitcoind_rpc>(session->log)
4550 {
4651 }
@@ -59,10 +64,6 @@ class BCN_API protocol_bitcoind_rpc
5964 void handle_receive_post (const code& ec,
6065 const post ::cptr& post ) NOEXCEPT override ;
6166
62- // Provide the request for serialization, keeping it out of dispatch.
63- void set_request (const network::http::request_cptr& request) NOEXCEPT;
64- const network::http::request& get_request () const NOEXCEPT;
65-
6667 // / Handlers.
6768 bool handle_get_best_block_hash (const code& ec,
6869 rpc_interface::get_best_block_hash) NOEXCEPT;
@@ -113,12 +114,8 @@ class BCN_API protocol_bitcoind_rpc
113114 // Send the response.
114115 void send_json (boost::json::value&& model, size_t size_hint) NOEXCEPT;
115116
116- // This is thread safe.
117- // //const options_t& options_;
118-
119- // These are protected by strand.
117+ // This is protected by strand.
120118 rpc_dispatcher rpc_dispatcher_{};
121- network::http::request_cptr request_{};
122119};
123120
124121} // namespace node
0 commit comments