Skip to content

Commit 0f91f05

Browse files
committed
fix(fork-choice): update all test call sites for in-place init pattern
Convert remaining ProtoArray.init and ForkChoiceStore.init test calls to use the in-place initialization pattern introduced in 1d83b2d.
1 parent 1d83b2d commit 0f91f05

3 files changed

Lines changed: 153 additions & 77 deletions

File tree

src/fork_choice/fork_choice.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2211,7 +2211,7 @@ fn initTestForkChoiceWithOpts(
22112211

22122212
const fc_store = try allocator.create(ForkChoiceStore);
22132213
errdefer allocator.destroy(fc_store);
2214-
fc_store.* = try ForkChoiceStore.init(allocator, current_slot, justified_checkpoint, finalized_checkpoint, justified_balances, test_balances_getter, .{});
2214+
try fc_store.init(allocator, current_slot, justified_checkpoint, finalized_checkpoint, justified_balances, test_balances_getter, .{});
22152215
errdefer fc_store.deinit(allocator);
22162216

22172217
const fc = try allocator.create(ForkChoice);

0 commit comments

Comments
 (0)