This change allows the user to specify a custom cookie file, which is then
used instead of `~/.bitcoin/.cookie`. This resolves situations when the
user wants to have the cookie file in non-standard path.
Aside from that, the code now pre-computes the default path, improving
the performance by avoiding allocation (and copying). Unfortunately, due
to limitations of Rust, the code doesn't print out cookie configuration
anymore. This however might be safer, since the cookie isn't printed,
and thus doesn't end up in some readable logs by accident.
Closes#176Closes#189
Also, move TransactionCache into `cache` module.
Following https://github.com/romanz/electrs/pull/161 by @dagurval.
Co-authored-by: Dagur Valberg Johannsson <dagurval@pvv.ntnu.no>
The addresses weren't resolved in case of deserializing from config
file. Besides, resolving addresses in parsing/deserialization code would
make messy code (harder to read). This commit fixes both issues by
moving address resolution to post-processing stage.
Since use of configuration files is both mmore secure and more
convenient and clap doesn't support config files, this switches to
configure_me, which supports config files, env vars and also generating
man pages.
Closes#151