|
|
|
@ -12,19 +12,24 @@ var LocalnetSchedule localnetSchedule |
|
|
|
|
|
|
|
|
|
type localnetSchedule struct{} |
|
|
|
|
|
|
|
|
|
const ( |
|
|
|
|
localnetV1Epoch = 10 |
|
|
|
|
localnetV2Epoch = 20 |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
func (localnetSchedule) InstanceForEpoch(epoch *big.Int) Instance { |
|
|
|
|
switch { |
|
|
|
|
case epoch.Cmp(big.NewInt(20)) >= 0: |
|
|
|
|
case epoch.Cmp(big.NewInt(localnetV2Epoch)) >= 0: |
|
|
|
|
return localnetV2 |
|
|
|
|
case epoch.Cmp(big.NewInt(10)) >= 0: |
|
|
|
|
case epoch.Cmp(big.NewInt(localnetV1Epoch)) >= 0: |
|
|
|
|
return localnetV1 |
|
|
|
|
default: // genesis
|
|
|
|
|
return localnetV0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var reshardingEpoch = []*big.Int{big.NewInt(10), big.NewInt(20)} |
|
|
|
|
var localnetReshardingEpoch = []*big.Int{big.NewInt(0), big.NewInt(localnetV1Epoch), big.NewInt(localnetV2Epoch)} |
|
|
|
|
|
|
|
|
|
var localnetV0 = MustNewInstance(2, 7, 5, genesis.LocalHarmonyAccounts, genesis.LocalFnAccounts, reshardingEpoch) |
|
|
|
|
var localnetV1 = MustNewInstance(2, 7, 5, genesis.LocalHarmonyAccountsV1, genesis.LocalFnAccountsV1, reshardingEpoch) |
|
|
|
|
var localnetV2 = MustNewInstance(2, 7, 4, genesis.LocalHarmonyAccountsV2, genesis.LocalFnAccountsV2, reshardingEpoch) |
|
|
|
|
var localnetV0 = MustNewInstance(2, 7, 5, genesis.LocalHarmonyAccounts, genesis.LocalFnAccounts, localnetReshardingEpoch) |
|
|
|
|
var localnetV1 = MustNewInstance(2, 7, 5, genesis.LocalHarmonyAccountsV1, genesis.LocalFnAccountsV1, localnetReshardingEpoch) |
|
|
|
|
var localnetV2 = MustNewInstance(2, 10, 4, genesis.LocalHarmonyAccountsV2, genesis.LocalFnAccountsV2, localnetReshardingEpoch) |
|
|
|
|