mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
more aggressive testing
This commit is contained in:
parent
1bc5579902
commit
38b9be84f2
1 changed files with 4 additions and 4 deletions
|
@ -73,7 +73,7 @@
|
||||||
#define DROP_ON_SYNC_WEDGE_THRESHOLD (30 * 1000000000ull) // nanoseconds
|
#define DROP_ON_SYNC_WEDGE_THRESHOLD (30 * 1000000000ull) // nanoseconds
|
||||||
#define LAST_ACTIVITY_STALL_THRESHOLD (2.0f) // seconds
|
#define LAST_ACTIVITY_STALL_THRESHOLD (2.0f) // seconds
|
||||||
#define WAIT_FOR_BLOCK_TIME (20) // seconds
|
#define WAIT_FOR_BLOCK_TIME (20) // seconds
|
||||||
#define DROP_PEERS_ON_SCORE -2
|
#define DROP_PEERS_ON_SCORE -1
|
||||||
|
|
||||||
namespace cryptonote
|
namespace cryptonote
|
||||||
{
|
{
|
||||||
|
@ -1730,7 +1730,7 @@ skip:
|
||||||
{
|
{
|
||||||
if (!m_p2p->for_connection(uuid, [&](cryptonote_connection_context& ctx, nodetool::peerid_type peer_id, uint32_t f)->bool{
|
if (!m_p2p->for_connection(uuid, [&](cryptonote_connection_context& ctx, nodetool::peerid_type peer_id, uint32_t f)->bool{
|
||||||
MINFO(ctx << "dropping bad peer (score " << ctx.m_score << ")");
|
MINFO(ctx << "dropping bad peer (score " << ctx.m_score << ")");
|
||||||
drop_connection(ctx, 5, false);
|
drop_connection(ctx, 10, false);
|
||||||
return true;
|
return true;
|
||||||
}))
|
}))
|
||||||
MDEBUG("Failed to find peer we wanted to drop");
|
MDEBUG("Failed to find peer we wanted to drop");
|
||||||
|
@ -1830,8 +1830,8 @@ skip:
|
||||||
{
|
{
|
||||||
MINFO(context << "Peer " << context.m_connection_id << " relayed the block we were waiting on");
|
MINFO(context << "Peer " << context.m_connection_id << " relayed the block we were waiting on");
|
||||||
context.m_score += 1;
|
context.m_score += 1;
|
||||||
if (context.m_score > 5) // prevent a node from being all nice for a while then switching to asshole
|
if (context.m_score > 10) // prevent a node from being all nice for a while then switching to asshole
|
||||||
context.m_score = 5;
|
context.m_score = 10;
|
||||||
context.m_waiting_for_block = "";
|
context.m_waiting_for_block = "";
|
||||||
context.m_waiting_for_block_deadline = std::numeric_limits<time_t>::max();
|
context.m_waiting_for_block_deadline = std::numeric_limits<time_t>::max();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue