aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool/config_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-13 23:35:46 +0800
committerobscuren <geffobscura@gmail.com>2015-04-13 23:35:46 +0800
commit333e539ce2143e9f416cef45053c1c21ce0312d4 (patch)
treeda21c5ca613615f78e7475f67e743c6d9464d1cb /blockpool/config_test.go
parenta8a2b2a488f7433abc09c51b751556875c9107a9 (diff)
parent1fa844aaf51beae9129b52a52f51b6602c52ccdb (diff)
downloadgo-tangerine-333e539ce2143e9f416cef45053c1c21ce0312d4.tar
go-tangerine-333e539ce2143e9f416cef45053c1c21ce0312d4.tar.gz
go-tangerine-333e539ce2143e9f416cef45053c1c21ce0312d4.tar.bz2
go-tangerine-333e539ce2143e9f416cef45053c1c21ce0312d4.tar.lz
go-tangerine-333e539ce2143e9f416cef45053c1c21ce0312d4.tar.xz
go-tangerine-333e539ce2143e9f416cef45053c1c21ce0312d4.tar.zst
go-tangerine-333e539ce2143e9f416cef45053c1c21ce0312d4.zip
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
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 e1ce31f27..e882fefe1 100644
--- a/blockpool/config_test.go
+++ b/blockpool/config_test.go
@@ -17,6 +17,7 @@ func TestBlockPoolConfig(t *testing.T) {
test.CheckInt("BlockBatchSize", c.BlockBatchSize, blockBatchSize, t)
test.CheckInt("BlocksRequestRepetition", c.BlocksRequestRepetition, blocksRequestRepetition, t)
test.CheckInt("BlocksRequestMaxIdleRounds", c.BlocksRequestMaxIdleRounds, blocksRequestMaxIdleRounds, t)
+ test.CheckInt("NodeCacheSize", c.NodeCacheSize, nodeCacheSize, t)
test.CheckDuration("BlockHashesRequestInterval", c.BlockHashesRequestInterval, blockHashesRequestInterval, t)
test.CheckDuration("BlocksRequestInterval", c.BlocksRequestInterval, blocksRequestInterval, t)
test.CheckDuration("BlockHashesTimeout", c.BlockHashesTimeout, blockHashesTimeout, t)
@@ -29,7 +30,7 @@ func TestBlockPoolConfig(t *testing.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, 4 * time.Second}
+ c := &Config{128, 32, 1, 0, 500, 300 * time.Millisecond, 100 * time.Millisecond, 90 * time.Second, 0, 30 * time.Second, 30 * time.Second, 4 * time.Second}
blockPool.Config = c
blockPool.Start()
@@ -37,6 +38,7 @@ func TestBlockPoolOverrideConfig(t *testing.T) {
test.CheckInt("BlockBatchSize", c.BlockBatchSize, 32, t)
test.CheckInt("BlocksRequestRepetition", c.BlocksRequestRepetition, blocksRequestRepetition, t)
test.CheckInt("BlocksRequestMaxIdleRounds", c.BlocksRequestMaxIdleRounds, blocksRequestMaxIdleRounds, t)
+ test.CheckInt("NodeCacheSize", c.NodeCacheSize, 500, t)
test.CheckDuration("BlockHashesRequestInterval", c.BlockHashesRequestInterval, 300*time.Millisecond, t)
test.CheckDuration("BlocksRequestInterval", c.BlocksRequestInterval, 100*time.Millisecond, t)
test.CheckDuration("BlockHashesTimeout", c.BlockHashesTimeout, 90*time.Second, t)