diff options
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 5 | ||||
-rw-r--r-- | src/rpc/core_rpc_server_commands_defs.h | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index ddf892cae..0cec3c26e 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -528,7 +528,7 @@ namespace cryptonote cryptonote_connection_context fake_context = AUTO_VAL_INIT(fake_context); tx_verification_context tvc = AUTO_VAL_INIT(tvc); - if(!m_core.handle_incoming_tx(tx_blob, tvc, false, false) || tvc.m_verifivation_failed) + if(!m_core.handle_incoming_tx(tx_blob, tvc, false, false, req.do_not_relay) || tvc.m_verifivation_failed) { if (tvc.m_verifivation_failed) { @@ -558,7 +558,7 @@ namespace cryptonote return true; } - if(!tvc.m_should_be_relayed || req.do_not_relay) + if(!tvc.m_should_be_relayed) { LOG_PRINT_L0("[on_send_raw_tx]: tx accepted, but not relayed"); res.reason = "Not relayed"; @@ -896,6 +896,7 @@ namespace cryptonote response.difficulty = m_core.get_blockchain_storage().block_difficulty(height); response.reward = get_block_reward(blk); response.block_size = m_core.get_blockchain_storage().get_db().get_block_size(height); + response.num_txes = blk.tx_hashes.size(); return true; } //------------------------------------------------------------------------------------------------------------------------------ diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index fa86c08e4..c1dc9ed6c 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 4 +#define CORE_RPC_VERSION_MINOR 5 #define CORE_RPC_VERSION (((CORE_RPC_VERSION_MAJOR)<<16)|(CORE_RPC_VERSION_MINOR)) struct COMMAND_RPC_GET_HEIGHT @@ -706,6 +706,7 @@ namespace cryptonote difficulty_type difficulty; uint64_t reward; uint64_t block_size; + uint64_t num_txes; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(major_version) @@ -720,6 +721,7 @@ namespace cryptonote KV_SERIALIZE(difficulty) KV_SERIALIZE(reward) KV_SERIALIZE(block_size) + KV_SERIALIZE(num_txes) END_KV_SERIALIZE_MAP() }; @@ -920,6 +922,7 @@ namespace cryptonote uint64_t receive_time; bool relayed; uint64_t last_relayed_time; + bool do_not_relay; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(id_hash) @@ -934,6 +937,7 @@ namespace cryptonote KV_SERIALIZE(receive_time) KV_SERIALIZE(relayed) KV_SERIALIZE(last_relayed_time) + KV_SERIALIZE(do_not_relay) END_KV_SERIALIZE_MAP() }; |