discovery: pass banThreshold to banman
So we can configure it via gossip's config in a following commit.
This commit is contained in:
3 files changed
+17
-12
No files matched your search
@@ -12,12 +12,14 @@ import (
|
||||
func TestPurgeBanEntries(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
b := newBanman()
|
||||
testBanThreshold := uint64(10)
|
||||
|
||||
b := newBanman(testBanThreshold)
|
||||
|
||||
// Ban a peer by repeatedly incrementing its ban score.
|
||||
peer1 := [33]byte{0x00}
|
||||
|
||||
for i := 0; i < banThreshold; i++ {
|
||||
for range testBanThreshold {
|
||||
b.incrementBanScore(peer1)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user