cmd/devp2p, eth/protocols/eth: fix tests + make sanity checks earlier (#22749)

This commit is contained in:
Martin Holst Swende
2021-04-28 08:48:07 +02:00
committed by GitHub
parent d9c9ee5ac9
commit 0c99868416
4 changed files with 16 additions and 8 deletions

View File

@ -19,6 +19,7 @@ package ethtest
import (
"os"
"testing"
"time"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/eth/ethconfig"
@ -87,8 +88,15 @@ func setupGeth(stack *node.Node) error {
}
backend, err := eth.New(stack, &ethconfig.Config{
Genesis: &chain.genesis,
NetworkId: chain.genesis.Config.ChainID.Uint64(), // 19763
Genesis: &chain.genesis,
NetworkId: chain.genesis.Config.ChainID.Uint64(), // 19763
DatabaseCache: 10,
TrieCleanCache: 10,
TrieCleanCacheJournal: "",
TrieCleanCacheRejournal: 60 * time.Minute,
TrieDirtyCache: 16,
TrieTimeout: 60 * time.Minute,
SnapshotCache: 10,
})
if err != nil {
return err