Skip to content

Commit 84063e7

Browse files
author
PengZhen
committed
fix: typ err
1 parent 1ffbcf9 commit 84063e7

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

clib/libyaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 840b65c40675e2d06bf40405ad3f12dec7f35923

src/spec_tests/ssz_static/root.zig

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const Roots = struct {
2323
root: [32]u8,
2424
};
2525

26-
const structMultiPhase = union {
26+
const StructMultiPhase = union {
2727
Attestation: types.Attestation,
2828
BeaconBlockBody: types.BeaconBlockBody,
2929
BeaconState: types.BeaconState,
@@ -56,12 +56,8 @@ const structMultiPhase = union {
5656
WithdrawalRequest: types.WithdrawalRequest,
5757
};
5858

59-
const altair = union {
60-
SyncAggregatorSelectionData: types.SyncAggregatorSelectionData,
61-
};
62-
6359
// test cases for all phases
64-
const commonUnion = union {
60+
const CommonUnion = union {
6561
// AggregateAndProof: types.AggregateAndProof,
6662
// AttestationData: types.AttestationData,
6763
// AttesterSlashing: types.AttesterSlashing,
@@ -87,16 +83,16 @@ const commonUnion = union {
8783
VoluntaryExit: types.VoluntaryExit,
8884
};
8985

90-
const forks = [_][]const u8{ "phase0", "altair", "bellatrix", "capella", "deneb", "electra" };
86+
const forkDirs = [_][]const u8{ "phase0", "altair", "bellatrix", "capella", "deneb", "electra" };
9187

9288
test "ssz static" {
9389
const testPath = "consensus-spec-tests/tests/mainnet";
9490
const gpa1 = testing.allocator;
95-
const fields = @typeInfo(commonUnion).@"union".fields;
91+
const fields = @typeInfo(CommonUnion).@"union".fields;
9692
inline for (fields) |field| {
9793
const fieldType = field.type;
9894
const fieldName = field.name;
99-
for (forks) |fork| {
95+
for (forkDirs) |fork| {
10096
const ssz_type_path = try std.fmt.allocPrint(gpa1, "{s}/{s}/ssz_static/{s}", .{ testPath, fork, fieldName });
10197

10298
var dirs = getLeafDirs(gpa1, ssz_type_path) catch |err| {

0 commit comments

Comments
 (0)