From bc36be1e58d1362b7a6deb2931fc89bdb4f23f9a Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Sat, 23 Dec 2023 19:06:18 +0100 Subject: [PATCH] Fixed block broadcast detection Peers could ban each other erroneously for "not broadcasting blocks" --- src/p2p_server.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p2p_server.cpp b/src/p2p_server.cpp index 0163290..f64afb5 100644 --- a/src/p2p_server.cpp +++ b/src/p2p_server.cpp @@ -2426,6 +2426,7 @@ void P2PServer::P2PClient::on_block_notify(const uint8_t* buf) memcpy(id.h, buf, HASH_SIZE); m_broadcastedHashes[m_broadcastedHashesIndex++ % array_size(&P2PClient::m_broadcastedHashes)] = id; + m_lastBroadcastTimestamp = seconds_since_epoch(); P2PServer* server = static_cast(m_owner);