From 9faef1f83abe4f1eafad9a605511cb2624201cdd Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 11 Feb 2017 19:38:18 +0000 Subject: cryptonote_protocol: misc fluffy block fixes - fix wrong block being used when a new block is received between a node elaying a fluffy block and sending a new fluffy block with txes a peer did not have - misc a neverending ping pong requesting the same missing txids when a new block is received in the meantime, causing the top block to not be the one we need - send the original fluffy block message block height when sending a new fluffy block, not the current top height, which might have been updated since - avoid sending back the whole block blob when asking for txes, send only the hash instead - plus misc cleanup and additional debugging logs --- src/cryptonote_protocol/cryptonote_protocol_defs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cryptonote_protocol/cryptonote_protocol_defs.h') diff --git a/src/cryptonote_protocol/cryptonote_protocol_defs.h b/src/cryptonote_protocol/cryptonote_protocol_defs.h index 843504621..427aa62df 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_defs.h +++ b/src/cryptonote_protocol/cryptonote_protocol_defs.h @@ -257,16 +257,16 @@ namespace cryptonote struct request { - block_complete_entry b; + crypto::hash block_hash; uint64_t current_blockchain_height; std::vector missing_tx_indices; uint32_t hop; BEGIN_KV_SERIALIZE_MAP() - KV_SERIALIZE(b) - KV_SERIALIZE_CONTAINER_POD_AS_BLOB(missing_tx_indices) - KV_SERIALIZE(hop) - KV_SERIALIZE(current_blockchain_height) + KV_SERIALIZE_VAL_POD_AS_BLOB(block_hash) + KV_SERIALIZE(current_blockchain_height) + KV_SERIALIZE_CONTAINER_POD_AS_BLOB(missing_tx_indices) + KV_SERIALIZE(hop) END_KV_SERIALIZE_MAP() }; }; -- cgit v1.2.3