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 --- tests/core_proxy/core_proxy.h | 2 ++ tests/unit_tests/ban.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/core_proxy/core_proxy.h b/tests/core_proxy/core_proxy.h index c649f51cc..09e16c4cc 100644 --- a/tests/core_proxy/core_proxy.h +++ b/tests/core_proxy/core_proxy.h @@ -92,5 +92,7 @@ namespace tests bool get_testnet() const { return false; } bool get_pool_transaction(const crypto::hash& id, cryptonote::transaction& tx) const { return false; } bool get_blocks(uint64_t start_offset, size_t count, std::list& blocks, std::list& txs) const { return false; } + bool get_transactions(const std::vector& txs_ids, std::list& txs, std::list& missed_txs) const { return false; } + bool get_block_by_hash(const crypto::hash &h, cryptonote::block &blk, bool *orphan = NULL) const { return false; } }; } diff --git a/tests/unit_tests/ban.cpp b/tests/unit_tests/ban.cpp index c6a3a14f0..88bbf7eec 100644 --- a/tests/unit_tests/ban.cpp +++ b/tests/unit_tests/ban.cpp @@ -67,6 +67,8 @@ public: bool get_testnet() const { return false; } bool get_pool_transaction(const crypto::hash& id, cryptonote::transaction& tx) const { return false; } bool get_blocks(uint64_t start_offset, size_t count, std::list& blocks, std::list& txs) const { return false; } + bool get_transactions(const std::vector& txs_ids, std::list& txs, std::list& missed_txs) const { return false; } + bool get_block_by_hash(const crypto::hash &h, cryptonote::block &blk, bool *orphan = NULL) const { return false; } }; typedef nodetool::node_server> Server; -- cgit v1.2.3