mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 01:27:38 +00:00
fix tests (downloader)
This commit is contained in:
parent
17d0b20a94
commit
9bc57439be
@ -40,17 +40,15 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
const OwerwriteBlockCacheItems = 1024
|
||||
const OwerwriteMaxForkAncestry = 3000
|
||||
const OverwriteBlockCacheItems = 1024
|
||||
const OverwriteMaxForkAncestry = 3000
|
||||
|
||||
// Reduce some of the parameters to make the tester faster.
|
||||
func init() {
|
||||
blockCacheItems = OwerwriteBlockCacheItems
|
||||
blockCacheMaxItems = OverwriteBlockCacheItems
|
||||
fsHeaderSafetyNet = 256
|
||||
fsHeaderContCheck = 50 * time.Millisecond
|
||||
fullMaxForkAncestry = 10000
|
||||
lightMaxForkAncestry = 10000
|
||||
blockCacheMaxItems = 1024
|
||||
fullMaxForkAncestry = OverwriteMaxForkAncestry
|
||||
fsHeaderContCheck = 500 * time.Millisecond
|
||||
}
|
||||
|
||||
@ -1277,7 +1275,7 @@ func testFailedSyncProgress(t *testing.T, protocol int, mode SyncMode) {
|
||||
defer tester.terminate()
|
||||
defer tester.peerDb.Close()
|
||||
|
||||
chain := testChainBase.shorten(blockCacheItems - 15)
|
||||
chain := testChainBase.shorten(blockCacheMaxItems - 15)
|
||||
|
||||
// Set a sync init hook to catch progress changes
|
||||
starting := make(chan struct{})
|
||||
|
@ -43,7 +43,7 @@ var (
|
||||
)
|
||||
|
||||
// The common prefix of all test chains:
|
||||
var testChainBase = newTestChain(OwerwriteBlockCacheItems+200, testDb, testGenesis)
|
||||
var testChainBase = newTestChain(OverwriteBlockCacheItems+200, testDb, testGenesis)
|
||||
|
||||
// Different forks on top of the base chain:
|
||||
var testChainForkLightA, testChainForkLightB, testChainForkHeavy *testChain
|
||||
|
Loading…
Reference in New Issue
Block a user