@@ -784,7 +784,7 @@ test EpochTracker {
784784
785785 _ = try epoch_tracker .insertUnrootedEpochInfo (
786786 allocator ,
787- branch .maxSlot (),
787+ branch .maxSlot ().? ,
788788 & branch ,
789789 try sig .core .stakes .randomEpochStakes (
790790 allocator ,
@@ -794,7 +794,7 @@ test EpochTracker {
794794 &.ALL_DISABLED ,
795795 );
796796
797- try epoch_tracker .onSlotRooted (allocator , branch .maxSlot (), & branch );
797+ try epoch_tracker .onSlotRooted (allocator , branch .maxSlot ().? , & branch );
798798 }
799799
800800 // Check that the root slot is 9 * 32 and epochs 6, 7, 8, 9 are available
@@ -815,10 +815,10 @@ test EpochTracker {
815815 // Check that trying to insert epoch info for epoch 9 fails because it is already rooted
816816 const branch = try Ancestors .initWithSlots (allocator , &.{319 });
817817 defer branch .deinit (allocator );
818- fail_stakes .stakes .epoch = epoch_schedule .getEpoch (branch .maxSlot ());
818+ fail_stakes .stakes .epoch = epoch_schedule .getEpoch (branch .maxSlot ().? );
819819 try std .testing .expectError (error .InvalidInsert , epoch_tracker .insertUnrootedEpochInfo (
820820 allocator ,
821- branch .maxSlot (),
821+ branch .maxSlot ().? ,
822822 & branch ,
823823 fail_stakes ,
824824 &.ALL_DISABLED ,
@@ -845,12 +845,12 @@ test EpochTracker {
845845 defer allocator .free (insert_ptrs );
846846 for (0.. 4) | i | insert_ptrs [i ] = try epoch_tracker .insertUnrootedEpochInfo (
847847 allocator ,
848- branches [i ].maxSlot (),
848+ branches [i ].maxSlot ().? ,
849849 & branches [i ],
850850 try sig .core .stakes .randomEpochStakes (
851851 allocator ,
852852 random ,
853- .{ .epoch = epoch_schedule .getEpoch (branches [i ].maxSlot ()) },
853+ .{ .epoch = epoch_schedule .getEpoch (branches [i ].maxSlot ().? ) },
854854 ),
855855 &.ALL_DISABLED ,
856856 );
@@ -862,31 +862,31 @@ test EpochTracker {
862862 );
863863
864864 // Check that another insert hits max forks
865- fail_stakes .stakes .epoch = epoch_schedule .getEpoch (branches [4 ].maxSlot ());
865+ fail_stakes .stakes .epoch = epoch_schedule .getEpoch (branches [4 ].maxSlot ().? );
866866 try std .testing .expectError (error .MaxForksExceeded , epoch_tracker .insertUnrootedEpochInfo (
867867 allocator ,
868- branches [4 ].maxSlot (),
868+ branches [4 ].maxSlot ().? ,
869869 & branches [4 ],
870870 fail_stakes ,
871871 &.ALL_DISABLED ,
872872 ));
873873
874874 // Root the first slot from branch 2
875- try epoch_tracker .onSlotRooted (allocator , branches [2 ].maxSlot (), & branches [2 ]);
875+ try epoch_tracker .onSlotRooted (allocator , branches [2 ].maxSlot ().? , & branches [2 ]);
876876
877877 // Check that the pointers returned from insert match the pointers returned from get
878878 for (0.. 4) | i | try std .testing .expectEqual (
879879 insert_ptrs [i ],
880880 if (i != 2 )
881881 try epoch_tracker .unrooted_epochs .get (& branches [i ])
882882 else
883- try epoch_tracker .rooted_epochs .get (epoch_schedule .getEpoch (branches [i ].maxSlot ())),
883+ try epoch_tracker .rooted_epochs .get (epoch_schedule .getEpoch (branches [i ].maxSlot ().? )),
884884 );
885885
886886 // Check we can't insert unrooted if the epoch is already rooted
887887 try std .testing .expectError (error .InvalidInsert , epoch_tracker .insertUnrootedEpochInfo (
888888 allocator ,
889- branches [4 ].maxSlot (),
889+ branches [4 ].maxSlot ().? ,
890890 & branches [4 ],
891891 fail_stakes ,
892892 &.ALL_DISABLED ,
0 commit comments