aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool/config_test.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-03-20 07:14:08 +0800
committerzelig <viktor.tron@gmail.com>2015-03-20 18:41:41 +0800
commita578db5dae0ae82ac8e06be8a29c48a7db22ebe0 (patch)
tree535e469b9511ec193b00591e3c3051d78c0801f3 /blockpool/config_test.go
parent8767179d7439d8a28086ae6162e2234ed9e16d64 (diff)
downloaddexon-a578db5dae0ae82ac8e06be8a29c48a7db22ebe0.tar
dexon-a578db5dae0ae82ac8e06be8a29c48a7db22ebe0.tar.gz
dexon-a578db5dae0ae82ac8e06be8a29c48a7db22ebe0.tar.bz2
dexon-a578db5dae0ae82ac8e06be8a29c48a7db22ebe0.tar.lz
dexon-a578db5dae0ae82ac8e06be8a29c48a7db22ebe0.tar.xz
dexon-a578db5dae0ae82ac8e06be8a29c48a7db22ebe0.tar.zst
dexon-a578db5dae0ae82ac8e06be8a29c48a7db22ebe0.zip
improve documentation and move one test
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 2cb93769e..e1ce31f27 100644
--- a/blockpool/config_test.go
+++ b/blockpool/config_test.go
@@ -23,12 +23,13 @@ func TestBlockPoolConfig(t *testing.T) {
test.CheckDuration("BlocksTimeout", c.BlocksTimeout, blocksTimeout, t)
test.CheckDuration("IdleBestPeerTimeout", c.IdleBestPeerTimeout, idleBestPeerTimeout, t)
test.CheckDuration("PeerSuspensionInterval", c.PeerSuspensionInterval, peerSuspensionInterval, t)
+ test.CheckDuration("StatusUpdateInterval", c.StatusUpdateInterval, statusUpdateInterval, t)
}
func TestBlockPoolOverrideConfig(t *testing.T) {
test.LogInit()
blockPool := &BlockPool{Config: &Config{}, chainEvents: &event.TypeMux{}}
- c := &Config{128, 32, 1, 0, 300 * time.Millisecond, 100 * time.Millisecond, 90 * time.Second, 0, 30 * time.Second, 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, 4 * time.Second}
blockPool.Config = c
blockPool.Start()
@@ -42,4 +43,5 @@ func TestBlockPoolOverrideConfig(t *testing.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)
+ test.CheckDuration("StatusUpdateInterval", c.StatusUpdateInterval, 4*time.Second, t)
}