@@ -23,7 +23,7 @@ const Roots = struct {
23
23
root : [32 ]u8 ,
24
24
};
25
25
26
- const structMultiPhase = union {
26
+ const StructMultiPhase = union {
27
27
Attestation : types.Attestation ,
28
28
BeaconBlockBody : types.BeaconBlockBody ,
29
29
BeaconState : types.BeaconState ,
@@ -56,12 +56,8 @@ const structMultiPhase = union {
56
56
WithdrawalRequest : types.WithdrawalRequest ,
57
57
};
58
58
59
- const altair = union {
60
- SyncAggregatorSelectionData : types.SyncAggregatorSelectionData ,
61
- };
62
-
63
59
// test cases for all phases
64
- const commonUnion = union {
60
+ const CommonUnion = union {
65
61
// AggregateAndProof: types.AggregateAndProof,
66
62
// AttestationData: types.AttestationData,
67
63
// AttesterSlashing: types.AttesterSlashing,
@@ -87,16 +83,16 @@ const commonUnion = union {
87
83
VoluntaryExit : types.VoluntaryExit ,
88
84
};
89
85
90
- const forks = [_ ][]const u8 { "phase0" , "altair" , "bellatrix" , "capella" , "deneb" , "electra" };
86
+ const forkDirs = [_ ][]const u8 { "phase0" , "altair" , "bellatrix" , "capella" , "deneb" , "electra" };
91
87
92
88
test "ssz static" {
93
89
const testPath = "consensus-spec-tests/tests/mainnet" ;
94
90
const gpa1 = testing .allocator ;
95
- const fields = @typeInfo (commonUnion ).@"union" .fields ;
91
+ const fields = @typeInfo (CommonUnion ).@"union" .fields ;
96
92
inline for (fields ) | field | {
97
93
const fieldType = field .type ;
98
94
const fieldName = field .name ;
99
- for (forks ) | fork | {
95
+ for (forkDirs ) | fork | {
100
96
const ssz_type_path = try std .fmt .allocPrint (gpa1 , "{s}/{s}/ssz_static/{s}" , .{ testPath , fork , fieldName });
101
97
102
98
var dirs = getLeafDirs (gpa1 , ssz_type_path ) catch | err | {
0 commit comments