diff --git a/include/bitcoin/node/interfaces/bitcoind.hpp b/include/bitcoin/node/interfaces/bitcoind.hpp index 17f70038..e0f9e1bb 100644 --- a/include/bitcoin/node/interfaces/bitcoind.hpp +++ b/include/bitcoin/node/interfaces/bitcoind.hpp @@ -36,18 +36,18 @@ struct bitcoind_methods method<"getblockchaininfo">{}, method<"getblockcount">{}, method<"getblockfilter", string_t, optional<"basic"_t>>{ "blockhash", "filtertype" }, - ////method<"getblockhash", double>{ "height" }, + method<"getblockhash", number_t>{ "height" }, method<"getblockheader", string_t, optional>{ "blockhash", "verbose" }, method<"getblockstats", string_t, optional>{ "hash_or_height", "stats" }, method<"getchaintxstats", optional<-1>, optional<""_t>>{ "nblocks", "blockhash" }, method<"getchainwork">{}, method<"gettxout", string_t, number_t, optional>{ "txid", "n", "include_mempool" }, method<"gettxoutsetinfo">{}, - ////method<"pruneblockchain", number_t>{ "height" }, + method<"pruneblockchain", number_t>{ "height" }, method<"savemempool">{}, method<"scantxoutset", string_t, optional>{ "action", "scanobjects" }, method<"verifychain", optional<4>, optional<288>>{ "checklevel", "nblocks" }, - ////method<"verifytxoutset", string_t>{ "input_verify_flag" }, + method<"verifytxoutset", string_t>{ "input_verify_flag" }, /////// Control methods. ////method<"getmemoryinfo", optional<"stats"_t>>{ "mode" }, @@ -158,18 +158,18 @@ struct bitcoind_methods using get_block_chain_info = at<2>; using get_block_count = at<3>; using get_block_filter = at<4>; - ////using get_block_hash = at<5>; - using get_block_header = at<5>; - using get_block_stats = at<6>; - using get_chain_tx_stats = at<7>; - using get_chain_work = at<8>; - using get_tx_out = at<9>; - using get_tx_out_set_info = at<10>; - ////using prune_block_chain = at<12>; - using save_mem_pool = at<11>; - using scan_tx_out_set = at<12>; - using verify_chain = at<13>; - ////using verify_tx_out_set = at<16>; + using get_block_hash = at<5>; + using get_block_header = at<6>; + using get_block_stats = at<7>; + using get_chain_tx_stats = at<8>; + using get_chain_work = at<9>; + using get_tx_out = at<10>; + using get_tx_out_set_info = at<11>; + using prune_block_chain = at<12>; + using save_mem_pool = at<13>; + using scan_tx_out_set = at<14>; + using verify_chain = at<15>; + using verify_tx_out_set = at<16>; ////using get_memory_info = at<17>; ////using get_rpc_info = at<18>; diff --git a/include/bitcoin/node/protocols/protocol_bitcoind.hpp b/include/bitcoin/node/protocols/protocol_bitcoind.hpp index 3f723c49..3fab06e5 100644 --- a/include/bitcoin/node/protocols/protocol_bitcoind.hpp +++ b/include/bitcoin/node/protocols/protocol_bitcoind.hpp @@ -71,8 +71,8 @@ class BCN_API protocol_bitcoind bool handle_get_block_filter(const code& ec, interface::get_block_filter, const std::string&, const std::string&) NOEXCEPT; - ////bool handle_get_block_hash(const code& ec, - //// interface::get_block_hash, double) NOEXCEPT; + bool handle_get_block_hash(const code& ec, + interface::get_block_hash, double) NOEXCEPT; bool handle_get_block_header(const code& ec, interface::get_block_header, const std::string&, bool) NOEXCEPT; bool handle_get_block_stats(const code& ec, @@ -86,8 +86,8 @@ class BCN_API protocol_bitcoind interface::get_tx_out, const std::string&, double, bool) NOEXCEPT; bool handle_get_tx_out_set_info(const code& ec, interface::get_tx_out_set_info) NOEXCEPT; - ////bool handle_prune_block_chain(const code& ec, - //// interface::prune_block_chain, double) NOEXCEPT; + bool handle_prune_block_chain(const code& ec, + interface::prune_block_chain, double) NOEXCEPT; bool handle_save_mem_pool(const code& ec, interface::save_mem_pool) NOEXCEPT; bool handle_scan_tx_out_set(const code& ec, @@ -95,8 +95,8 @@ class BCN_API protocol_bitcoind const network::rpc::array_t&) NOEXCEPT; bool handle_verify_chain(const code& ec, interface::verify_chain, double, double) NOEXCEPT; - //bool handle_verify_tx_out_set(const code& ec, - // interface::verify_tx_out_set, const std::string&) NOEXCEPT; + bool handle_verify_tx_out_set(const code& ec, + interface::verify_tx_out_set, const std::string&) NOEXCEPT; private: // This is thread safe. diff --git a/src/protocols/protocol_bitcoind.cpp b/src/protocols/protocol_bitcoind.cpp index 50d1f2f3..132d4398 100644 --- a/src/protocols/protocol_bitcoind.cpp +++ b/src/protocols/protocol_bitcoind.cpp @@ -56,18 +56,18 @@ void protocol_bitcoind::start() NOEXCEPT SUBSCRIBE_BITCOIND(handle_get_block_chain_info, _1, _2); SUBSCRIBE_BITCOIND(handle_get_block_count, _1, _2); SUBSCRIBE_BITCOIND(handle_get_block_filter, _1, _2, _3, _4); - ////SUBSCRIBE_BITCOIND(handle_get_block_hash, _1, _2, _3); + SUBSCRIBE_BITCOIND(handle_get_block_hash, _1, _2, _3); SUBSCRIBE_BITCOIND(handle_get_block_header, _1, _2, _3, _4); SUBSCRIBE_BITCOIND(handle_get_block_stats, _1, _2, _3, _4); SUBSCRIBE_BITCOIND(handle_get_chain_tx_stats, _1, _2, _3, _4); SUBSCRIBE_BITCOIND(handle_get_chain_work, _1, _2); SUBSCRIBE_BITCOIND(handle_get_tx_out, _1, _2, _3, _4, _5); SUBSCRIBE_BITCOIND(handle_get_tx_out_set_info, _1, _2); - ////SUBSCRIBE_BITCOIND(handle_prune_block_chain, _1, _2, _3); + SUBSCRIBE_BITCOIND(handle_prune_block_chain, _1, _2, _3); SUBSCRIBE_BITCOIND(handle_save_mem_pool, _1, _2); SUBSCRIBE_BITCOIND(handle_scan_tx_out_set, _1, _2, _3, _4); SUBSCRIBE_BITCOIND(handle_verify_chain, _1, _2, _3, _4); - ////SUBSCRIBE_BITCOIND(handle_verify_tx_out_set, _1, _2, _3); + SUBSCRIBE_BITCOIND(handle_verify_tx_out_set, _1, _2, _3); protocol_bitcoind::start(); } @@ -145,12 +145,12 @@ bool protocol_bitcoind::handle_get_block_filter(const code& ec, return !ec; } -////// method<"getblockhash", number_t>{ "height" }, -////bool protocol_bitcoind::handle_get_block_hash(const code& ec, -//// interface::get_block_hash, network::rpc::number_t) NOEXCEPT -////{ -//// return !ec; -////} +// method<"getblockhash", number_t>{ "height" }, +bool protocol_bitcoind::handle_get_block_hash(const code& ec, + interface::get_block_hash, network::rpc::number_t) NOEXCEPT +{ + return !ec; +} // method<"getblockheader", string_t, optional>{ "blockhash", "verbose" }, bool protocol_bitcoind::handle_get_block_header(const code& ec, @@ -193,12 +193,12 @@ bool protocol_bitcoind::handle_get_tx_out_set_info(const code& ec, return !ec; } -////// method<"pruneblockchain", number_t>{ "height" }, -////bool protocol_bitcoind::handle_prune_block_chain(const code& ec, -//// interface::prune_block_chain, double) NOEXCEPT -////{ -//// return !ec; -////} +// method<"pruneblockchain", number_t>{ "height" }, +bool protocol_bitcoind::handle_prune_block_chain(const code& ec, + interface::prune_block_chain, double) NOEXCEPT +{ + return !ec; +} bool protocol_bitcoind::handle_save_mem_pool(const code& ec, interface::save_mem_pool) NOEXCEPT @@ -221,12 +221,12 @@ bool protocol_bitcoind::handle_verify_chain(const code& ec, return !ec; } -////// method<"verifytxoutset", string_t>{ "input_verify_flag" }, -////bool protocol_bitcoind::handle_verify_tx_out_set(const code& ec, -//// interface::verify_tx_out_set, const std::string&) NOEXCEPT -////{ -//// return !ec; -////} +// method<"verifytxoutset", string_t>{ "input_verify_flag" }, +bool protocol_bitcoind::handle_verify_tx_out_set(const code& ec, + interface::verify_tx_out_set, const std::string&) NOEXCEPT +{ + return !ec; +} BC_POP_WARNING() BC_POP_WARNING()