@@ -10,8 +10,8 @@ import { produce } from "immer";
1010import { countBy } from "lodash" ;
1111import {
1212 currentSlotAtom ,
13- earliestProcessedSlotLeaderAtom ,
1413 epochAtom ,
14+ firstProcessedSlotAtom ,
1515 leaderSlotsAtom ,
1616 slotOverrideAtom ,
1717} from "../../../atoms" ;
@@ -30,22 +30,22 @@ function getSlotState(
3030 slot ?: number ,
3131 epoch ?: Epoch ,
3232 leaderSlots ?: number [ ] ,
33- earliestProcessedSlotLeader ?: number ,
33+ firstProcessedSlot ?: number ,
3434 currentSlot ?: number ,
3535) {
3636 if ( slot === undefined ) return SelectedSlotValidityState . Valid ;
3737 if (
3838 ! epoch ||
3939 ! leaderSlots ||
40- earliestProcessedSlotLeader === undefined ||
40+ firstProcessedSlot === undefined ||
4141 currentSlot === undefined
4242 )
4343 return SelectedSlotValidityState . NotReady ;
4444 if ( slot < epoch . start_slot || epoch . end_slot < slot )
4545 return SelectedSlotValidityState . OutsideEpoch ;
4646 if ( ! leaderSlots . includes ( getSlotGroupLeader ( slot ) ) )
4747 return SelectedSlotValidityState . NotYou ;
48- if ( slot < earliestProcessedSlotLeader )
48+ if ( slot < firstProcessedSlot )
4949 return SelectedSlotValidityState . BeforeFirstProcessed ;
5050 if ( slot >= currentSlot ) return SelectedSlotValidityState . Future ;
5151 return SelectedSlotValidityState . Valid ;
@@ -60,13 +60,13 @@ export const baseSelectedSlotAtom = (function () {
6060 const epoch = get ( epochAtom ) ;
6161 const slot = get ( _baseSelectedSlotAtom ) ;
6262 const leaderSlots = get ( leaderSlotsAtom ) ;
63- const earliestProcessedSlotLeader = get ( earliestProcessedSlotLeaderAtom ) ;
63+ const firstProcessedSlot = get ( firstProcessedSlotAtom ) ;
6464 const currentSlot = get ( currentSlotAtom ) ;
6565 const state = getSlotState (
6666 slot ,
6767 epoch ,
6868 leaderSlots ,
69- earliestProcessedSlotLeader ,
69+ firstProcessedSlot ,
7070 currentSlot ,
7171 ) ;
7272 return {
@@ -78,12 +78,12 @@ export const baseSelectedSlotAtom = (function () {
7878 } ,
7979 ( get , set , slot ?: number , epoch ?: Epoch ) => {
8080 const leaderSlots = get ( leaderSlotsAtom ) ;
81- const earliestProcessedSlotLeader = get ( earliestProcessedSlotLeaderAtom ) ;
81+ const firstProcessedSlot = get ( firstProcessedSlotAtom ) ;
8282 const currentSlot = get ( currentSlotAtom ) ;
8383 if (
8484 ! epoch ||
8585 ! leaderSlots ||
86- earliestProcessedSlotLeader === undefined ||
86+ firstProcessedSlot === undefined ||
8787 currentSlot === undefined
8888 ) {
8989 set ( _baseSelectedSlotAtom , undefined ) ;
@@ -97,7 +97,7 @@ export const baseSelectedSlotAtom = (function () {
9797 slot ,
9898 epoch ,
9999 leaderSlots ,
100- earliestProcessedSlotLeader ,
100+ firstProcessedSlot ,
101101 currentSlot ,
102102 ) === SelectedSlotValidityState . Valid ;
103103
0 commit comments