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
This commit is contained in:
moneromooo-monero 2017-02-11 19:38:18 +00:00
parent cb54eeaa31
commit 9faef1f83a
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
4 changed files with 82 additions and 42 deletions

View file

@ -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<cryptonote::block>& blocks, std::list<cryptonote::transaction>& txs) const { return false; }
bool get_transactions(const std::vector<crypto::hash>& txs_ids, std::list<cryptonote::transaction>& txs, std::list<crypto::hash>& 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<cryptonote::t_cryptonote_protocol_handler<test_core>> Server;