mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-23 21:57:46 +00:00
rpc: added miner_tx_hash to resp of getblock
This commit is contained in:
parent
af448d3883
commit
a524b7508e
2 changed files with 4 additions and 1 deletions
|
@ -1280,6 +1280,7 @@ namespace cryptonote
|
||||||
error_resp.message = "Internal error: can't produce valid response.";
|
error_resp.message = "Internal error: can't produce valid response.";
|
||||||
return false;
|
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)
|
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]));
|
res.tx_hashes.push_back(epee::string_tools::pod_to_hex(blk.tx_hashes[n]));
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace cryptonote
|
||||||
// advance which version they will stop working with
|
// advance which version they will stop working with
|
||||||
// Don't go over 32767 for any of these
|
// Don't go over 32767 for any of these
|
||||||
#define CORE_RPC_VERSION_MAJOR 1
|
#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 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)
|
#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;
|
std::string status;
|
||||||
block_header_response block_header;
|
block_header_response block_header;
|
||||||
|
std::string miner_tx_hash;
|
||||||
std::vector<std::string> tx_hashes;
|
std::vector<std::string> tx_hashes;
|
||||||
std::string blob;
|
std::string blob;
|
||||||
std::string json;
|
std::string json;
|
||||||
|
|
||||||
BEGIN_KV_SERIALIZE_MAP()
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
KV_SERIALIZE(block_header)
|
KV_SERIALIZE(block_header)
|
||||||
|
KV_SERIALIZE(miner_tx_hash)
|
||||||
KV_SERIALIZE(tx_hashes)
|
KV_SERIALIZE(tx_hashes)
|
||||||
KV_SERIALIZE(status)
|
KV_SERIALIZE(status)
|
||||||
KV_SERIALIZE(blob)
|
KV_SERIALIZE(blob)
|
||||||
|
|
Loading…
Reference in a new issue