use of tech.pegasys.teku.spec.datastructures.forkchoice.MutableStore in project teku by ConsenSys.
the class ForkChoiceUtilTest method onTick_shouldExitImmediatelyWhenCurrentTimeIsBeforeGenesisTime.
@Test
void onTick_shouldExitImmediatelyWhenCurrentTimeIsBeforeGenesisTime() {
final MutableStore store = mock(MutableStore.class);
when(store.getGenesisTime()).thenReturn(UInt64.valueOf(3000));
when(store.getTime()).thenReturn(UInt64.ZERO);
forkChoiceUtil.onTick(store, UInt64.valueOf(2000));
verify(store, never()).setTime(any());
}
use of tech.pegasys.teku.spec.datastructures.forkchoice.MutableStore in project teku by ConsenSys.
the class ForkChoiceUtilTest method onTick_shouldExitImmediatelyWhenCurrentTimeIsBeforeStoreTime.
@Test
void onTick_shouldExitImmediatelyWhenCurrentTimeIsBeforeStoreTime() {
final MutableStore store = mock(MutableStore.class);
when(store.getGenesisTime()).thenReturn(UInt64.valueOf(3000));
when(store.getTime()).thenReturn(UInt64.valueOf(5000));
forkChoiceUtil.onTick(store, UInt64.valueOf(4000));
verify(store, never()).setTime(any());
}
Aggregations