diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-21 01:01:05 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-21 01:01:05 +0800 |
commit | f4e9638867f5dab01eeb6db5fdbd85737a11fbd6 (patch) | |
tree | 8d8cbfeb2533a2b84e5f0927e9bfdd688cdffbb2 /blockpool/config_test.go | |
parent | 54dac59285ccc6a3af47201479ca556da2899e93 (diff) | |
parent | ecd10d2cf765072cd74347b9e0ca2bb85091450f (diff) | |
download | go-tangerine-f4e9638867f5dab01eeb6db5fdbd85737a11fbd6.tar go-tangerine-f4e9638867f5dab01eeb6db5fdbd85737a11fbd6.tar.gz go-tangerine-f4e9638867f5dab01eeb6db5fdbd85737a11fbd6.tar.bz2 go-tangerine-f4e9638867f5dab01eeb6db5fdbd85737a11fbd6.tar.lz go-tangerine-f4e9638867f5dab01eeb6db5fdbd85737a11fbd6.tar.xz go-tangerine-f4e9638867f5dab01eeb6db5fdbd85737a11fbd6.tar.zst go-tangerine-f4e9638867f5dab01eeb6db5fdbd85737a11fbd6.zip |
Merge branch 'ethersphere-frontier/blockpool' into conversion
Diffstat (limited to 'blockpool/config_test.go')
-rw-r--r-- | blockpool/config_test.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/blockpool/config_test.go b/blockpool/config_test.go index d5540c864..e1ce31f27 100644 --- a/blockpool/config_test.go +++ b/blockpool/config_test.go @@ -5,11 +5,12 @@ import ( "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{}} + blockPool := &BlockPool{Config: &Config{}, chainEvents: &event.TypeMux{}} blockPool.Start() c := blockPool.Config test.CheckInt("BlockHashesBatchSize", c.BlockHashesBatchSize, blockHashesBatchSize, t) @@ -21,12 +22,14 @@ 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) + test.CheckDuration("StatusUpdateInterval", c.StatusUpdateInterval, statusUpdateInterval, 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} + 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} blockPool.Config = c blockPool.Start() @@ -39,4 +42,6 @@ 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) + test.CheckDuration("StatusUpdateInterval", c.StatusUpdateInterval, 4*time.Second, t) } |