romanz / electrs

An efficient re-implementation of Electrum Server in Rust
MIT License
1.1k stars 408 forks source link

Bug: unused config fields (silently ignored config flags) #1044

Closed antonilol closed 4 months ago

antonilol commented 6 months ago

Describe the bug

The config fields daemon_dir and args (in src/config.rs) and timestamp (in the generated config struct) are unused. I discovered this by running a very recent build of clippy (cargo +nightly clippy) on the code base instead of clippy using the configured version (1.63). The daemon_dir and timestamp command line arguments (or in the config file) are silently ignored.

Electrs version current master, 603830f1b921928089c558d90519b7ca0c0d4658

To Reproduce Steps to reproduce the behavior: 2 ways:

Expected behavior assuming no future plans with the daemon_dir flag, that can be removed if you ask me timestamp can just be removed, and the current behavior of showing timestamps can be kept as is what is the current use of args? if I try to pass unknown flags I get an error, so I assume it is always empty then

rest of the issue template is not applicable to this as it is a code issue

romanz commented 5 months ago

Good catch, thanks! Could you please open a PR to remove the unused flags?

Kixunil commented 5 months ago

Perhaps issue deprecation release?