-
Hardcoded, relative log file path. The log path is the hardcoded relative string "thala-node.log", writing to the current working directory regardless of --data-dir. A 1.7 MB log file currently sits in the repository root.
-
Dead code. src/tracing_config.rs is completely empty (0 bytes) — tracing config actually lives in shared/src/tracing.rs. Separately, Node::_task_queue: VecDeque<TaskId> is declared but never read or written; the leading underscore only silences the warning.
-
Informal message fields on handshake structs. ConnectionReq and ConnectionResp each carry an Option<String> message used only for debug strings like "Sup peer" and "Sup peer at 127.0.0.1:5674". These serve no protocol purpose and waste serialized bandwidth.
Locations
// src/main.rs — hardcoded relative log path
let tracing_config = TracingConfig {
enable_file_logging: true,
file_path: Some("thala-node.log".to_string()),
...
};
// src/node.rs / src/message.rs — informal message fields
message: Some(format!("Sup peer at {}", peer_addr)),
message: Some("Sup peer".to_string()),
Fix
- Default the log file path to
{data_dir}/thala-node.log, resolved after CLI args are parsed, and add *.log to .gitignore.
- Delete the empty
src/tracing_config.rs (and its mod declaration) and remove the _task_queue field and its initializer.
- Remove the
message field from both handshake structs and all construction sites.
Hardcoded, relative log file path. The log path is the hardcoded relative string
"thala-node.log", writing to the current working directory regardless of--data-dir. A 1.7 MB log file currently sits in the repository root.Dead code.
src/tracing_config.rsis completely empty (0 bytes) — tracing config actually lives inshared/src/tracing.rs. Separately,Node::_task_queue: VecDeque<TaskId>is declared but never read or written; the leading underscore only silences the warning.Informal
messagefields on handshake structs.ConnectionReqandConnectionRespeach carry anOption<String> messageused only for debug strings like"Sup peer"and"Sup peer at 127.0.0.1:5674". These serve no protocol purpose and waste serialized bandwidth.Locations
src/main.rs, lines 20–27 — hardcoded log path.src/tracing_config.rs— empty file to delete (and remove anymod tracing_config;declaration).src/node.rsline 99 — unused_task_queuefield.src/message.rs—ConnectionReq,ConnectionResp, lines 13–28 ·src/node.rsline 275 ·src/node.rsline 385 —messagefields and construction sites.Fix
{data_dir}/thala-node.log, resolved after CLI args are parsed, and add*.logto.gitignore.src/tracing_config.rs(and itsmoddeclaration) and remove the_task_queuefield and its initializer.messagefield from both handshake structs and all construction sites.