diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-16 02:22:51 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-16 02:22:51 +0800 |
commit | cea1723c68375a1109a4fe606848d5c822321779 (patch) | |
tree | 7000315be2ec1818444ea059cc99f88e2e2b49e3 /eth/downloader | |
parent | 98998534cb0f415fb85826d60607652240022c57 (diff) | |
parent | 412cf98bbcb7387de588e4e949380787af000a4c (diff) | |
download | go-tangerine-cea1723c68375a1109a4fe606848d5c822321779.tar go-tangerine-cea1723c68375a1109a4fe606848d5c822321779.tar.gz go-tangerine-cea1723c68375a1109a4fe606848d5c822321779.tar.bz2 go-tangerine-cea1723c68375a1109a4fe606848d5c822321779.tar.lz go-tangerine-cea1723c68375a1109a4fe606848d5c822321779.tar.xz go-tangerine-cea1723c68375a1109a4fe606848d5c822321779.tar.zst go-tangerine-cea1723c68375a1109a4fe606848d5c822321779.zip |
Merge pull request #997 from karalabe/fix-shitty-test-server-issue
eth/downloader: fix #992, where tests may time out on a slow machine
Diffstat (limited to 'eth/downloader')
-rw-r--r-- | eth/downloader/downloader_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/eth/downloader/downloader_test.go b/eth/downloader/downloader_test.go index d55664314..19d64ac67 100644 --- a/eth/downloader/downloader_test.go +++ b/eth/downloader/downloader_test.go @@ -472,6 +472,9 @@ func TestMadeupHashChainAttack(t *testing.T) { // Tests that if a malicious peer makes up a random block chain, and tried to // push indefinitely, it actually gets caught with it. func TestMadeupBlockChainAttack(t *testing.T) { + defaultBlockTTL := blockTTL + defaultCrossCheckCycle := crossCheckCycle + blockTTL = 100 * time.Millisecond crossCheckCycle = 25 * time.Millisecond @@ -490,6 +493,9 @@ func TestMadeupBlockChainAttack(t *testing.T) { t.Fatalf("synchronisation error mismatch: have %v, want %v", err, ErrCrossCheckFailed) } // Ensure that a valid chain can still pass sync + blockTTL = defaultBlockTTL + crossCheckCycle = defaultCrossCheckCycle + tester.hashes = hashes tester.newPeer("valid", big.NewInt(20000), hashes[0]) if _, err := tester.syncTake("valid", hashes[0]); err != nil { |