From e396146aeebd61d6a26003045d554f6e94d5f028 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 18 Jan 2019 01:05:58 +0000 Subject: default initialize rpc structures --- src/cryptonote_protocol/cryptonote_protocol_defs.h | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'src/cryptonote_protocol') diff --git a/src/cryptonote_protocol/cryptonote_protocol_defs.h b/src/cryptonote_protocol/cryptonote_protocol_defs.h index 2d5d10d67..23846dbf8 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_defs.h +++ b/src/cryptonote_protocol/cryptonote_protocol_defs.h @@ -128,7 +128,7 @@ namespace cryptonote { const static int ID = BC_COMMANDS_POOL_BASE + 1; - struct request + struct request_t { block_complete_entry b; uint64_t current_blockchain_height; @@ -138,6 +138,7 @@ namespace cryptonote KV_SERIALIZE(current_blockchain_height) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init request; }; /************************************************************************/ @@ -147,7 +148,7 @@ namespace cryptonote { const static int ID = BC_COMMANDS_POOL_BASE + 2; - struct request + struct request_t { std::vector txs; std::string _; // padding @@ -157,6 +158,7 @@ namespace cryptonote KV_SERIALIZE(_) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init request; }; /************************************************************************/ /* */ @@ -165,7 +167,7 @@ namespace cryptonote { const static int ID = BC_COMMANDS_POOL_BASE + 3; - struct request + struct request_t { std::vector txs; std::vector blocks; @@ -175,13 +177,14 @@ namespace cryptonote KV_SERIALIZE_CONTAINER_POD_AS_BLOB(blocks) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init request; }; struct NOTIFY_RESPONSE_GET_OBJECTS { const static int ID = BC_COMMANDS_POOL_BASE + 4; - struct request + struct request_t { std::vector txs; std::vector blocks; @@ -195,6 +198,7 @@ namespace cryptonote KV_SERIALIZE(current_blockchain_height) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init request; }; @@ -219,7 +223,7 @@ namespace cryptonote { const static int ID = BC_COMMANDS_POOL_BASE + 6; - struct request + struct request_t { std::list block_ids; /*IDs of the first 10 blocks are sequential, next goes with pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block */ @@ -227,13 +231,14 @@ namespace cryptonote KV_SERIALIZE_CONTAINER_POD_AS_BLOB(block_ids) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init request; }; struct NOTIFY_RESPONSE_CHAIN_ENTRY { const static int ID = BC_COMMANDS_POOL_BASE + 7; - struct request + struct request_t { uint64_t start_height; uint64_t total_height; @@ -247,6 +252,7 @@ namespace cryptonote KV_SERIALIZE_CONTAINER_POD_AS_BLOB(m_block_ids) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init request; }; /************************************************************************/ @@ -256,7 +262,7 @@ namespace cryptonote { const static int ID = BC_COMMANDS_POOL_BASE + 8; - struct request + struct request_t { block_complete_entry b; uint64_t current_blockchain_height; @@ -266,6 +272,7 @@ namespace cryptonote KV_SERIALIZE(current_blockchain_height) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init request; }; /************************************************************************/ @@ -275,7 +282,7 @@ namespace cryptonote { const static int ID = BC_COMMANDS_POOL_BASE + 9; - struct request + struct request_t { crypto::hash block_hash; uint64_t current_blockchain_height; @@ -287,6 +294,7 @@ namespace cryptonote KV_SERIALIZE_CONTAINER_POD_AS_BLOB(missing_tx_indices) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init request; }; } -- cgit v1.2.3