diff options
author | stoffu <stoffu@protonmail.ch> | 2017-10-28 23:25:47 +0900 |
---|---|---|
committer | stoffu <stoffu@protonmail.ch> | 2017-11-14 16:31:46 +0900 |
commit | a524b7508e14413ccfb3c0655a5330d416687453 (patch) | |
tree | 3c875e78b2374b83536cfd8077d8067541c2ae9f | |
parent | Merge pull request #2694 (diff) | |
download | monero-a524b7508e14413ccfb3c0655a5330d416687453.tar.xz |
rpc: added miner_tx_hash to resp of getblock
-rwxr-xr-x | src/rpc/core_rpc_server.cpp | 1 | ||||
-rw-r--r-- | src/rpc/core_rpc_server_commands_defs.h | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index b3ce30d0c..1e3bf1b3a 100755 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -1280,6 +1280,7 @@ namespace cryptonote error_resp.message = "Internal error: can't produce valid response."; return false; } + res.miner_tx_hash = epee::string_tools::pod_to_hex(cryptonote::get_transaction_hash(blk.miner_tx)); for (size_t n = 0; n < blk.tx_hashes.size(); ++n) { res.tx_hashes.push_back(epee::string_tools::pod_to_hex(blk.tx_hashes[n])); diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index ee2a79eb4..d4c1a673e 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -49,7 +49,7 @@ namespace cryptonote // advance which version they will stop working with // Don't go over 32767 for any of these #define CORE_RPC_VERSION_MAJOR 1 -#define CORE_RPC_VERSION_MINOR 15 +#define CORE_RPC_VERSION_MINOR 16 #define MAKE_CORE_RPC_VERSION(major,minor) (((major)<<16)|(minor)) #define CORE_RPC_VERSION MAKE_CORE_RPC_VERSION(CORE_RPC_VERSION_MAJOR, CORE_RPC_VERSION_MINOR) @@ -1217,12 +1217,14 @@ namespace cryptonote { std::string status; block_header_response block_header; + std::string miner_tx_hash; std::vector<std::string> tx_hashes; std::string blob; std::string json; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(block_header) + KV_SERIALIZE(miner_tx_hash) KV_SERIALIZE(tx_hashes) KV_SERIALIZE(status) KV_SERIALIZE(blob) |