diff options
| author | Riccardo Spagni <ric@spagni.net> | 2019-07-17 21:18:20 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2019-07-17 21:18:20 +0200 |
| commit | 8eb075e78914dd5c8de373a2b3ce97791f29b34d (patch) | |
| tree | 90e2f50c129861eadd6ae3b1e3e0302be060c4e1 /src/cryptonote_protocol | |
| parent | fd3ff741644152ed559fcf79550435d3df75b764 (diff) | |
| parent | a96c1a46d4b3854252de75cbe09458ad5d1aecb0 (diff) | |
| download | monzero-core-8eb075e78914dd5c8de373a2b3ce97791f29b34d.tar.gz monzero-core-8eb075e78914dd5c8de373a2b3ce97791f29b34d.tar.xz monzero-core-8eb075e78914dd5c8de373a2b3ce97791f29b34d.zip | |
Merge pull request #5732
a96c1a46 cryptonote_protocol: drop peers we can't download from when syncing (moneromooo-monero)
ab361df2 p2p: add a few missing connection close calls (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_protocol')
| -rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index b38407840..03d04a074 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -341,6 +341,11 @@ namespace cryptonote if(m_core.have_block(hshd.top_id)) { + if (target > hshd.current_height) + { + MINFO(context << "peer is not ahead of us and we're syncing, disconnecting"); + return false; + } context.m_state = cryptonote_connection_context::state_normal; if(is_inital && target == m_core.get_current_blockchain_height()) on_connection_synchronized(); |
