Store only fully verified blocks in the cache
This commit is contained in:
+1
-3
@@ -120,7 +120,7 @@ void P2PServer::add_cached_block(const PoolBlock& block)
|
||||
|
||||
void P2PServer::store_in_cache(const PoolBlock& block)
|
||||
{
|
||||
if (m_cache) {
|
||||
if (m_cache && block.m_verified && !block.m_invalid) {
|
||||
m_cache->store(block);
|
||||
}
|
||||
}
|
||||
@@ -1323,8 +1323,6 @@ bool P2PServer::P2PClient::handle_incoming_block_async(PoolBlock* block)
|
||||
return true;
|
||||
}
|
||||
|
||||
server->store_in_cache(*block);
|
||||
|
||||
struct Work
|
||||
{
|
||||
uv_work_t req;
|
||||
|
||||
Reference in New Issue
Block a user