From 8a61b33d8e36bb31c3de43f0fbc6aa58f3d6805c Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 6 Apr 2019 16:13:17 +0000 Subject: [PATCH] rpc: omit irrelevant fields for pool txes in gettransactions --- src/rpc/core_rpc_server_commands_defs.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index 06bec9e7a..29bc17922 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -375,10 +375,16 @@ namespace cryptonote KV_SERIALIZE(as_json) KV_SERIALIZE(in_pool) KV_SERIALIZE(double_spend_seen) - KV_SERIALIZE(block_height) - KV_SERIALIZE(block_timestamp) - KV_SERIALIZE(output_indices) - KV_SERIALIZE(relayed) + if (!this_ref.in_pool) + { + KV_SERIALIZE(block_height) + KV_SERIALIZE(block_timestamp) + KV_SERIALIZE(output_indices) + } + else + { + KV_SERIALIZE(relayed) + } END_KV_SERIALIZE_MAP() };