mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-12 06:53:46 +00:00
refactor
This commit is contained in:
parent
4afed25f7a
commit
fe5b6adac0
3 changed files with 496 additions and 529 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -59,7 +59,7 @@ func TestValidatorWentOffline(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create an Ethash network based off of the Ropsten config
|
// Create an Ethash network based off of the Ropsten config
|
||||||
genesis := InitGenesis(t, faucets, "./testdata/genesis_2val.json")
|
genesis := InitGenesis(t, faucets, "./testdata/genesis_2val.json", 8)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
stacks []*node.Node
|
stacks []*node.Node
|
||||||
|
|
|
||||||
|
|
@ -428,7 +428,7 @@ func InitMiner(genesis *core.Genesis, privKey *ecdsa.PrivateKey, withoutHeimdall
|
||||||
return stack, ethBackend, err
|
return stack, ethBackend, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitGenesis(t *testing.T, faucets []*ecdsa.PrivateKey, fileLocation string) *core.Genesis {
|
func InitGenesis(t *testing.T, faucets []*ecdsa.PrivateKey, fileLocation string, sprintSize uint64) *core.Genesis {
|
||||||
|
|
||||||
// sprint size = 8 in genesis
|
// sprint size = 8 in genesis
|
||||||
genesisData, err := ioutil.ReadFile(fileLocation)
|
genesisData, err := ioutil.ReadFile(fileLocation)
|
||||||
|
|
@ -444,6 +444,7 @@ func InitGenesis(t *testing.T, faucets []*ecdsa.PrivateKey, fileLocation string)
|
||||||
|
|
||||||
genesis.Config.ChainID = big.NewInt(15001)
|
genesis.Config.ChainID = big.NewInt(15001)
|
||||||
genesis.Config.EIP150Hash = common.Hash{}
|
genesis.Config.EIP150Hash = common.Hash{}
|
||||||
|
genesis.Config.Bor.Sprint["0"] = sprintSize
|
||||||
|
|
||||||
return genesis
|
return genesis
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue