0ef9987e9e
* Splits `atomic_write_to_tmp_file` out of `zebra_network::Config::update_peer_cache` * Uses the new `atomic_write_to_tmp_file` fn in `update_peer_cache()` * Replaces repetitive code for getting the default peer and state cache directories with `default_cache_dir()` * Converts `atomic_write_to_tmp_file` to a blocking function and adds `spawn_atomic_write_to_tmp_file` for use in async environments. * Uses `atomic_write_to_tmp_file` to write database versions to disk * Removes `spawn_atomic_write_to_tmp_file()` and inlines its body at its callsite to avoid adding tokio as a dependency of zebra-chain. * Apply suggestions from code review Co-authored-by: Marek <mail@marek.onl> --------- Co-authored-by: Marek <mail@marek.onl> |
||
---|---|---|
.. | ||
amount | ||
block | ||
chain_sync_status | ||
chain_tip | ||
diagnostic | ||
fmt | ||
history_tree | ||
orchard | ||
parallel | ||
parameters | ||
primitives | ||
sapling | ||
serialization | ||
sprout | ||
tests | ||
transaction | ||
transparent | ||
value_balance | ||
work | ||
amount.rs | ||
block.rs | ||
chain_sync_status.rs | ||
chain_tip.rs | ||
common.rs | ||
diagnostic.rs | ||
error.rs | ||
fmt.rs | ||
history_tree.rs | ||
lib.rs | ||
orchard.rs | ||
parallel.rs | ||
parameters.rs | ||
primitives.rs | ||
sapling.rs | ||
serialization.rs | ||
shutdown.rs | ||
sprout.rs | ||
subtree.rs | ||
tests.rs | ||
transaction.rs | ||
transparent.rs | ||
value_balance.rs | ||
work.rs |