mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
eth/downloader: fix tests
This commit is contained in:
parent
3653814017
commit
1569a9d307
1 changed files with 2 additions and 2 deletions
|
|
@ -1594,13 +1594,13 @@ func testCheckpointEnforcement(t *testing.T, protocol int, mode SyncMode) {
|
||||||
tester.newPeer("peer", protocol, chain)
|
tester.newPeer("peer", protocol, chain)
|
||||||
|
|
||||||
var expect error
|
var expect error
|
||||||
if mode == FastSync {
|
if mode == FastSync || mode == LightSync {
|
||||||
expect = errUnsyncedPeer
|
expect = errUnsyncedPeer
|
||||||
}
|
}
|
||||||
if err := tester.sync("peer", nil, mode); err != expect {
|
if err := tester.sync("peer", nil, mode); err != expect {
|
||||||
t.Fatalf("block sync error mismatch: have %v, want %v", err, expect)
|
t.Fatalf("block sync error mismatch: have %v, want %v", err, expect)
|
||||||
}
|
}
|
||||||
if mode == FastSync {
|
if mode == FastSync || mode == LightSync {
|
||||||
assertOwnChain(t, tester, 1)
|
assertOwnChain(t, tester, 1)
|
||||||
} else {
|
} else {
|
||||||
assertOwnChain(t, tester, chain.len())
|
assertOwnChain(t, tester, chain.len())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue