diff options
Diffstat (limited to 'src/cryptonote_protocol/cryptonote_protocol_defs.h')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_defs.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_defs.h b/src/cryptonote_protocol/cryptonote_protocol_defs.h index c49371d48..289223b6d 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_defs.h +++ b/src/cryptonote_protocol/cryptonote_protocol_defs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2018, The Monero Project +// Copyright (c) 2014-2019, The Monero Project // // All rights reserved. // @@ -48,6 +48,7 @@ namespace cryptonote bool incoming; bool localhost; bool local_ip; + bool ssl; std::string address; std::string host; @@ -127,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; @@ -137,6 +138,7 @@ namespace cryptonote KV_SERIALIZE(current_blockchain_height) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init<request_t> request; }; /************************************************************************/ @@ -146,7 +148,7 @@ namespace cryptonote { const static int ID = BC_COMMANDS_POOL_BASE + 2; - struct request + struct request_t { std::vector<blobdata> txs; std::string _; // padding @@ -156,6 +158,7 @@ namespace cryptonote KV_SERIALIZE(_) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init<request_t> request; }; /************************************************************************/ /* */ @@ -164,7 +167,7 @@ namespace cryptonote { const static int ID = BC_COMMANDS_POOL_BASE + 3; - struct request + struct request_t { std::vector<crypto::hash> txs; std::vector<crypto::hash> blocks; @@ -174,13 +177,14 @@ namespace cryptonote KV_SERIALIZE_CONTAINER_POD_AS_BLOB(blocks) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init<request_t> request; }; struct NOTIFY_RESPONSE_GET_OBJECTS { const static int ID = BC_COMMANDS_POOL_BASE + 4; - struct request + struct request_t { std::vector<blobdata> txs; std::vector<block_complete_entry> blocks; @@ -194,6 +198,7 @@ namespace cryptonote KV_SERIALIZE(current_blockchain_height) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init<request_t> request; }; @@ -218,7 +223,7 @@ namespace cryptonote { const static int ID = BC_COMMANDS_POOL_BASE + 6; - struct request + struct request_t { std::list<crypto::hash> 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 */ @@ -226,13 +231,14 @@ namespace cryptonote KV_SERIALIZE_CONTAINER_POD_AS_BLOB(block_ids) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init<request_t> 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; @@ -246,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_t> request; }; /************************************************************************/ @@ -255,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; @@ -265,6 +272,7 @@ namespace cryptonote KV_SERIALIZE(current_blockchain_height) END_KV_SERIALIZE_MAP() }; + typedef epee::misc_utils::struct_init<request_t> request; }; /************************************************************************/ @@ -274,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; @@ -286,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_t> request; }; } |