Fix testnet config for staking (#2182)

* Add one-off block verification rule for beacon chain bad block

* Add more comment

* Fix testnet config
pull/2185/head v1.3.0
Rongjian Lan 5 years ago committed by GitHub
parent d98267c113
commit 1241ece48c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      internal/configs/sharding/testnet.go

@ -27,7 +27,7 @@ const (
func (testnetSchedule) InstanceForEpoch(epoch *big.Int) Instance { func (testnetSchedule) InstanceForEpoch(epoch *big.Int) Instance {
switch { switch {
case epoch.Cmp(params.PangaeaChainConfig.StakingEpoch) >= 0: case epoch.Cmp(params.TestnetChainConfig.StakingEpoch) >= 0:
return testnetV1 return testnetV1
default: // genesis default: // genesis
return testnetV0 return testnetV0
@ -77,8 +77,8 @@ func (ts testnetSchedule) GetShardingStructure(numShard, shardID int) []map[stri
var testnetReshardingEpoch = []*big.Int{ var testnetReshardingEpoch = []*big.Int{
big.NewInt(0), big.NewInt(0),
params.PangaeaChainConfig.StakingEpoch, params.TestnetChainConfig.StakingEpoch,
} }
var testnetV0 = MustNewInstance(3, 10, 7, genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, testnetReshardingEpoch, TestnetSchedule.BlocksPerEpoch()) var testnetV0 = MustNewInstance(3, 10, 7, genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, testnetReshardingEpoch, TestnetSchedule.BlocksPerEpoch())
var testnetV1 = MustNewInstance(3, 10, 3, genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, testnetReshardingEpoch, TestnetSchedule.BlocksPerEpoch()) var testnetV1 = MustNewInstance(3, 20, 7, genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, testnetReshardingEpoch, TestnetSchedule.BlocksPerEpoch())

Loading…
Cancel
Save