Skip to content

Commit

Permalink
Resets the fpRate to the reduced rate to reset (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcw-grunt authored Apr 8, 2023
1 parent a3ea246 commit 1a15ac0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BRPeerManager.c
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,10 @@ static void _peerRelayedBlock(void *info, BRMerkleBlock *block)
manager->fpRate > BLOOM_DEFAULT_FALSEPOSITIVE_RATE*10.0) {
peer_log(peer, "bloom filter false positive rate %f too high after %"PRIu32" blocks, disconnecting...",
manager->fpRate, manager->lastBlock->height + 1 - manager->filterUpdateHeight);

//Resets the fpRate to the reduced fpRate to allow further connection
manager->fpRate = BLOOM_REDUCED_FALSEPOSITIVE_RATE;

BRPeerDisconnect(peer);
}
else if (manager->lastBlock->height + 500 < BRPeerLastBlock(peer) &&
Expand Down

0 comments on commit 1a15ac0

Please sign in to comment.