update shuffling caches at epoch boundary (#12661)

* update shuffling caches at epoch boundary

* move span

* do not advance to a past slot
This commit is contained in:
Potuz
2023-07-26 14:46:18 -04:00
committed by GitHub
parent ec60cab2bf
commit 337c254161
4 changed files with 80 additions and 75 deletions

View File

@@ -539,8 +539,7 @@ func TestHandleEpochBoundary_UpdateFirstSlot(t *testing.T) {
s, _ := util.DeterministicGenesisState(t, 1024)
service.head = &head{state: s}
require.NoError(t, s.SetSlot(2*params.BeaconConfig().SlotsPerEpoch))
require.NoError(t, service.handleEpochBoundary(ctx, s, []byte{}))
require.Equal(t, 3*params.BeaconConfig().SlotsPerEpoch, service.nextEpochBoundarySlot)
require.NoError(t, service.handleEpochBoundary(ctx, s.Slot(), s, []byte{}))
}
func TestOnBlock_CanFinalize_WithOnTick(t *testing.T) {