Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bench/state_transition/process_epoch.zig
Original file line number Diff line number Diff line change
Expand Up @@ -698,11 +698,11 @@ fn runBenchmark(
const validators = try beacon_state.?.validatorsSlice(allocator);
defer allocator.free(validators);

try state_transition.syncPubkeys(validators, &pubkey_index_map, &index_pubkey_cache);
try state_transition.syncPubkeys(validators, &pubkey_index_map, index_pubkey_cache);

const immutable_data = state_transition.EpochCacheImmutableData{
.config = &beacon_config,
.index_to_pubkey = &index_pubkey_cache,
.index_to_pubkey = index_pubkey_cache,
.pubkey_to_index = &pubkey_index_map,
};

Expand Down
6 changes: 3 additions & 3 deletions bindings/napi/BeaconStateView.zig
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ pub fn BeaconStateView_createMultiProof(env: napi.Env, cb: napi.CallbackInfo(1))
// Get the root node from the state
try cached_state.state.commit();
const root_node = switch (cached_state.state.*) {
inline else => |*state| state.base_view.data.root,
inline else => |state| state.root,
};

// Create proof input for compact multi-proof
Expand Down Expand Up @@ -880,7 +880,7 @@ pub fn BeaconStateView_serialize(env: napi.Env, cb: napi.CallbackInfo(0)) !napi.
pub fn BeaconStateView_serializedSize(env: napi.Env, cb: napi.CallbackInfo(0)) !napi.Value {
const cached_state = try env.unwrap(CachedBeaconState, cb.this());
const size = switch (cached_state.state.*) {
inline else => |*state| try state.serializedSize(),
inline else => |state| try state.serializedSize(),
};
return try env.createInt64(@intCast(size));
}
Expand All @@ -902,7 +902,7 @@ pub fn BeaconStateView_serializeToBytes(env: napi.Env, cb: napi.CallbackInfo(2))

const output_slice = output_info.data[offset..];
const bytes_written = switch (cached_state.state.*) {
inline else => |*state| try state.serializeIntoBytes(output_slice),
inline else => |state| try state.serializeIntoBytes(output_slice),
};

return try env.createInt64(@intCast(bytes_written));
Expand Down
2 changes: 1 addition & 1 deletion src/consensus_types/phase0.zig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub const Checkpoint = ssz.FixedContainerType(struct {
root: p.Root,
});

pub const Validator = ssz.FixedContainerType(struct {
pub const Validator = ssz.StructContainerType(struct {
pubkey: p.BLSPubkey,
withdrawal_credentials: p.Root,
effective_balance: p.Gwei,
Expand Down
Loading
Loading