|
|
@ -290,9 +290,9 @@ func (w *Worker) SuperCommitteeForNextEpoch( |
|
|
|
nextCommittee shard.State |
|
|
|
nextCommittee shard.State |
|
|
|
oops error |
|
|
|
oops error |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
// WARN This currently not working and breaks around 15 block
|
|
|
|
switch shardID { |
|
|
|
// switch shardID {
|
|
|
|
case shard.BeaconChainShardID: |
|
|
|
// case shard.BeaconChainShardID:
|
|
|
|
if shard.Schedule.IsLastBlock(w.current.header.Number().Uint64()) { |
|
|
|
if shard.Schedule.IsLastBlock(w.current.header.Number().Uint64()) { |
|
|
|
nextCommittee, oops = committee.WithStakingEnabled.Compute( |
|
|
|
nextCommittee, oops = committee.WithStakingEnabled.Compute( |
|
|
|
new(big.Int).Add(w.current.header.Epoch(), common.Big1), |
|
|
|
new(big.Int).Add(w.current.header.Epoch(), common.Big1), |
|
|
@ -300,16 +300,16 @@ func (w *Worker) SuperCommitteeForNextEpoch( |
|
|
|
beacon, |
|
|
|
beacon, |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
default: |
|
|
|
// default:
|
|
|
|
// WARN When we first enable staking, this condition may not be robust by itself.
|
|
|
|
// WARN When we first enable staking, this condition may not be robust by itself.
|
|
|
|
switch beacon.CurrentHeader().Epoch().Cmp(w.current.header.Epoch()) { |
|
|
|
// switch beacon.CurrentHeader().Epoch().Cmp(w.current.header.Epoch()) {
|
|
|
|
case 1: |
|
|
|
// case 1:
|
|
|
|
nextCommittee, oops = committee.WithStakingEnabled.ReadFromDB( |
|
|
|
// nextCommittee, oops = committee.WithStakingEnabled.ReadFromDB(
|
|
|
|
beacon.CurrentHeader().Epoch(), beacon, |
|
|
|
// beacon.CurrentHeader().Epoch(), beacon,
|
|
|
|
) |
|
|
|
// )
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
// }
|
|
|
|
return nextCommittee, oops |
|
|
|
return nextCommittee, oops |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|