This commit is contained in:
Arpit Temani 2022-10-19 22:49:15 +05:30
parent 4afed25f7a
commit fe5b6adac0
3 changed files with 496 additions and 529 deletions

File diff suppressed because it is too large Load diff

View file

@ -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

View file

@ -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
} }