mirror of
https://github.com/monero-project/monero.git
synced 2025-08-11 13:40:12 -04:00
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.
This commit is contained in:
parent
7482253a6d
commit
635929eaca
3 changed files with 22 additions and 0 deletions
|
@ -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()
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue