diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-21 18:03:02 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-21 18:03:02 +0800 |
commit | f4cd66dc009191f51fc47d9c218c1073a1552bdf (patch) | |
tree | 62ccd1501fc52a4f4606c8bee0f00bc99756c088 /blockpool/config_test.go | |
parent | ed0817c55dc45290d9de594fea28f7bc35d564da (diff) | |
download | go-tangerine-f4cd66dc009191f51fc47d9c218c1073a1552bdf.tar go-tangerine-f4cd66dc009191f51fc47d9c218c1073a1552bdf.tar.gz go-tangerine-f4cd66dc009191f51fc47d9c218c1073a1552bdf.tar.bz2 go-tangerine-f4cd66dc009191f51fc47d9c218c1073a1552bdf.tar.lz go-tangerine-f4cd66dc009191f51fc47d9c218c1073a1552bdf.tar.xz go-tangerine-f4cd66dc009191f51fc47d9c218c1073a1552bdf.tar.zst go-tangerine-f4cd66dc009191f51fc47d9c218c1073a1552bdf.zip |
blockpool: deleted
Diffstat (limited to 'blockpool/config_test.go')
-rw-r--r-- | blockpool/config_test.go | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/blockpool/config_test.go b/blockpool/config_test.go deleted file mode 100644 index e882fefe1..000000000 --- a/blockpool/config_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package blockpool - -import ( - "testing" - "time" - - "github.com/ethereum/go-ethereum/blockpool/test" - "github.com/ethereum/go-ethereum/event" -) - -func TestBlockPoolConfig(t *testing.T) { - test.LogInit() - blockPool := &BlockPool{Config: &Config{}, chainEvents: &event.TypeMux{}} - blockPool.Start() - c := blockPool.Config - test.CheckInt("BlockHashesBatchSize", c.BlockHashesBatchSize, blockHashesBatchSize, 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) - 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, 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() - test.CheckInt("BlockHashesBatchSize", c.BlockHashesBatchSize, 128, 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) - 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) -} |