aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool/config_test.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-03-20 06:46:54 +0800
committerzelig <viktor.tron@gmail.com>2015-03-20 18:41:40 +0800
commit50661f0e683b4975894a0e8fe16024724adef72d (patch)
tree1a7769500acdd3d2b5815c472b7e6701e8ae2d8f /blockpool/config_test.go
parent01ff0b3176e6d83dcc5e6716f04301de71e3fc9e (diff)
downloadgo-tangerine-50661f0e683b4975894a0e8fe16024724adef72d.tar.gz
go-tangerine-50661f0e683b4975894a0e8fe16024724adef72d.tar.zst
go-tangerine-50661f0e683b4975894a0e8fe16024724adef72d.zip
peer suspension to disallow reconnect after disconnect on fatal error for set period (PeerSuspensionInterval)
Diffstat (limited to 'blockpool/config_test.go')
-rw-r--r--blockpool/config_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/blockpool/config_test.go b/blockpool/config_test.go
index d5540c864..8eeaceb51 100644
--- a/blockpool/config_test.go
+++ b/blockpool/config_test.go
@@ -21,12 +21,13 @@ func TestBlockPoolConfig(t *testing.T) {
test.CheckDuration("BlockHashesTimeout", c.BlockHashesTimeout, blockHashesTimeout, t)
test.CheckDuration("BlocksTimeout", c.BlocksTimeout, blocksTimeout, t)
test.CheckDuration("IdleBestPeerTimeout", c.IdleBestPeerTimeout, idleBestPeerTimeout, t)
+ test.CheckDuration("PeerSuspensionInterval", c.PeerSuspensionInterval, peerSuspensionInterval, t)
}
func TestBlockPoolOverrideConfig(t *testing.T) {
test.LogInit()
blockPool := &BlockPool{Config: &Config{}}
- c := &Config{128, 32, 1, 0, 300 * time.Millisecond, 100 * time.Millisecond, 90 * time.Second, 0, 30 * time.Second}
+ c := &Config{128, 32, 1, 0, 300 * time.Millisecond, 100 * time.Millisecond, 90 * time.Second, 0, 30 * time.Second, 30 * time.Second}
blockPool.Config = c
blockPool.Start()
@@ -39,4 +40,5 @@ func TestBlockPoolOverrideConfig(t *testing.T) {
test.CheckDuration("BlockHashesTimeout", c.BlockHashesTimeout, 90*time.Second, t)
test.CheckDuration("BlocksTimeout", c.BlocksTimeout, blocksTimeout, t)
test.CheckDuration("IdleBestPeerTimeout", c.IdleBestPeerTimeout, 30*time.Second, t)
+ test.CheckDuration("PeerSuspensionInterval", c.PeerSuspensionInterval, 30*time.Second, t)
}