From 635929eaca6b376708d7c5fabf9b743b8a706981 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 9 Aug 2017 09:31:00 +0100 Subject: protocol: add checks for top block hard fork version We won't even talk to a peer which claims a wrong version for its top block. This will avoid syncing to known bad peers in the first place. Also add IP fails when failing to verify a block. --- src/cryptonote_protocol/cryptonote_protocol_defs.h | 2 ++ 1 file changed, 2 insertions(+) (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 042ae49f6..37b503436 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_defs.h +++ b/src/cryptonote_protocol/cryptonote_protocol_defs.h @@ -195,10 +195,12 @@ namespace cryptonote { uint64_t current_height; crypto::hash top_id; + uint8_t top_version; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(current_height) KV_SERIALIZE_VAL_POD_AS_BLOB(top_id) + KV_SERIALIZE_OPT(top_version, (uint8_t)0) END_KV_SERIALIZE_MAP() }; -- cgit v1.2.3