Skip to content

Commit 1cd3152

Browse files
committed
feat:fmt
Signed-off-by: Chen Kai <281165273grape@gmail.com>
1 parent 12ec2ac commit 1cd3152

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/consensus/helpers/validator.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,22 +539,22 @@ pub fn getUnslashedParticipatingIndices(
539539
return result_slice;
540540
}
541541

542-
pub fn getEligibleValidatorIndices(state: *consensus.BeaconState,allocator:std.mem.Allocator) ![]primitives.ValidatorIndex {
542+
pub fn getEligibleValidatorIndices(state: *consensus.BeaconState, allocator: std.mem.Allocator) ![]primitives.ValidatorIndex {
543543
const previous_epoch = epoch_helper.getPreviousEpoch(state);
544544
var eligible = std.ArrayList(primitives.ValidatorIndex).init(allocator);
545545
defer eligible.deinit();
546546

547547
for (state.validators(), 0..) |v, index| {
548548
if (isActiveValidator(&v, previous_epoch) or
549-
(v.slashed and previous_epoch + 1 < v.withdrawable_epoch)) {
549+
(v.slashed and previous_epoch + 1 < v.withdrawable_epoch))
550+
{
550551
try eligible.append(@as(primitives.ValidatorIndex, index));
551552
}
552553
}
553554

554555
return eligible.toOwnedSlice();
555556
}
556557

557-
558558
test "test getBalanceChurnLimit" {
559559
preset.ActivePreset.set(preset.Presets.minimal);
560560
defer preset.ActivePreset.reset();

0 commit comments

Comments
 (0)