protocol: fix spurious rejection of downloaded blocks

when kicking a peer for inactivity, clear the set of requested blocks,
or next time we requests blocks from it, we'll probably reject the
incoming blocks due to missing the previous requested blocks
This commit is contained in:
moneromooo-monero 2021-10-21 20:34:06 +00:00
parent 753dc901a1
commit 1f81f5f5c1
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 1 additions and 0 deletions

View File

@ -153,6 +153,7 @@ namespace cryptonote
context.m_last_request_time = boost::date_time::not_a_date_time; context.m_last_request_time = boost::date_time::not_a_date_time;
context.m_expect_response = 0; context.m_expect_response = 0;
context.m_expect_height = 0; context.m_expect_height = 0;
context.m_requested_objects.clear();
context.m_state = cryptonote_connection_context::state_standby; // we'll go back to adding, then (if we can't), download context.m_state = cryptonote_connection_context::state_standby; // we'll go back to adding, then (if we can't), download
} }
else else