Skip to content

Commit d317fdb

Browse files
committed
shred_network cli: take genesis file path
1 parent 03e94fa commit d317fdb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cmd.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ pub fn main() !void {
159159
params.gossip_base.apply(&current_config);
160160
params.gossip_node.apply(&current_config);
161161
params.repair.apply(&current_config);
162+
current_config.genesis_file_path = params.genesis_file_path;
162163
current_config.shred_network.dump_shred_tracker = params.repair.dump_shred_tracker;
163164
current_config.turbine.overwrite_stake_for_testing =
164165
params.overwrite_stake_for_testing;
@@ -796,6 +797,7 @@ const Cmd = struct {
796797
gossip_base: GossipArgumentsCommon,
797798
gossip_node: GossipArgumentsNode,
798799
repair: RepairArgumentsBase,
800+
genesis_file_path: ?[]const u8,
799801
/// TODO: Remove when no longer needed
800802
overwrite_stake_for_testing: bool,
801803
no_retransmit: bool,
@@ -823,6 +825,7 @@ const Cmd = struct {
823825
.gossip_base = GossipArgumentsCommon.cmd_info,
824826
.gossip_node = GossipArgumentsNode.cmd_info,
825827
.repair = RepairArgumentsBase.cmd_info,
828+
.genesis_file_path = genesis_file_path_arg,
826829
.overwrite_stake_for_testing = .{
827830
.kind = .named,
828831
.name_override = null,
@@ -1565,6 +1568,7 @@ fn shredNetwork(
15651568
}
15661569

15671570
const genesis_path = try cfg.genesisFilePath() orelse
1571+
cfg.genesis_file_path orelse
15681572
return error.GenesisPathNotProvided;
15691573
const genesis_config = try GenesisConfig.init(allocator, genesis_path);
15701574

0 commit comments

Comments
 (0)