From 79c9b4015e6a93232762d67918b0e4fa24d78370 Mon Sep 17 00:00:00 2001 From: Drew Nutter Date: Fri, 31 May 2024 18:25:06 -0400 Subject: [PATCH] refactor(shred_collector): rename service manager variable --- src/shred_collector/service.zig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/shred_collector/service.zig b/src/shred_collector/service.zig index c9f1afdc5..76d2d8def 100644 --- a/src/shred_collector/service.zig +++ b/src/shred_collector/service.zig @@ -64,8 +64,8 @@ pub fn start( deps: ShredCollectorDependencies, interface: ShredCollectorInterface, ) !ServiceManager { - var shred_collector = ServiceManager.init(deps.allocator, deps.logger, interface.exit); - var arena = shred_collector.arena(); + var service_manager = ServiceManager.init(deps.allocator, deps.logger, interface.exit); + var arena = service_manager.arena(); const repair_socket = try bindUdpReusable(conf.repair_port); const tvu_socket = try bindUdpReusable(conf.tvu_port); @@ -94,7 +94,7 @@ pub fn start( interface.exit, ); const repair_svc = try arena.create(RepairService); - try shred_collector.defers.deferCall(RepairService.deinit, .{repair_svc}); + try service_manager.defers.deferCall(RepairService.deinit, .{repair_svc}); repair_svc.* = RepairService.init( deps.allocator, deps.logger, @@ -103,7 +103,7 @@ pub fn start( repair_peer_provider, shred_tracker, ); - try shred_collector.spawn( + try service_manager.spawn( RepairService.run_config, RepairService.sendNecessaryRepairs, .{repair_svc}, @@ -129,23 +129,23 @@ pub fn start( .outgoing_shred_channel = unverified_shreds_channel, .shred_version = interface.my_shred_version, }; - try shred_collector.spawn(.{ .name = "Shred Receiver" }, ShredReceiver.run, .{shred_receiver}); + try service_manager.spawn(.{ .name = "Shred Receiver" }, ShredReceiver.run, .{shred_receiver}); // verifier (thread) - try shred_collector.spawn( + try service_manager.spawn( .{ .name = "Shred Verifier" }, sig.shred_collector.runShredSignatureVerification, .{ interface.exit, unverified_shreds_channel, verified_shreds_channel, .{} }, ); // processor (thread) - try shred_collector.spawn( + try service_manager.spawn( .{ .name = "Shred Processor" }, sig.shred_collector.processShreds, .{ deps.allocator, verified_shreds_channel, shred_tracker }, ); - return shred_collector; + return service_manager; } fn bindUdpReusable(port: u16) !Socket {