From b666d66e5397b2b1ae13c587d450131c09b47d1d Mon Sep 17 00:00:00 2001 From: clemahieu Date: Thu, 30 Oct 2014 23:25:52 -0500 Subject: [PATCH] Removing checksum from keepalive. --- rai/core/core.cpp | 5 +---- rai/core/core.hpp | 1 - rai/test/message.cpp | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/rai/core/core.cpp b/rai/core/core.cpp index d46a0437..37f6e9cb 100644 --- a/rai/core/core.cpp +++ b/rai/core/core.cpp @@ -137,7 +137,6 @@ void rai::network::maintain_keepalive (boost::asio::ip::udp::endpoint const & en { rai::keepalive message; client.peers.random_fill (message.peers); - message.checksum = client.ledger.checksum (0, std::numeric_limits ::max ()); std::shared_ptr > bytes (new std::vector ); { rai::vectorstream stream (*bytes); @@ -1334,7 +1333,6 @@ void rai::keepalive::serialize (rai::stream & stream_a) write (stream_a, bytes); write (stream_a, i->port ()); } - write (stream_a, checksum); } bool rai::keepalive::deserialize (rai::stream & stream_a) @@ -1355,7 +1353,6 @@ bool rai::keepalive::deserialize (rai::stream & stream_a) read (stream_a, port); *i = rai::endpoint (boost::asio::ip::address_v6 (address), port); } - read (stream_a, checksum); return result; } @@ -3356,7 +3353,7 @@ void rai::block_store::checksum_del (uint64_t prefix, uint8_t mask) bool rai::keepalive::operator == (rai::keepalive const & other_a) const { - return (peers == other_a.peers) && (checksum == other_a.checksum); + return peers == other_a.peers; } bool rai::peer_container::known_peer (rai::endpoint const & endpoint_a) diff --git a/rai/core/core.hpp b/rai/core/core.hpp index d99c899c..da7fa657 100644 --- a/rai/core/core.hpp +++ b/rai/core/core.hpp @@ -163,7 +163,6 @@ namespace rai { void serialize (rai::stream &) override; bool operator == (rai::keepalive const &) const; std::array peers; - rai::uint256_union checksum; }; class publish : public message { diff --git a/rai/test/message.cpp b/rai/test/message.cpp index d8071a7e..0730cf79 100644 --- a/rai/test/message.cpp +++ b/rai/test/message.cpp @@ -19,7 +19,6 @@ TEST (message, keepalive_deserialize) { rai::keepalive message1; message1.peers [0] = rai::endpoint (boost::asio::ip::address_v6::loopback (), 10000); - message1.checksum = 1; std::vector bytes; { rai::vectorstream stream (bytes);