mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(p2p): add anchor file for discovery state (#11)
* feat(p2p): add anchor file for discovery state * move rustdoc and improve error messages Co-authored-by: Bjerg <onbjerg@users.noreply.github.com> * add temp file tests and log drop error * fix error due to lack of read option * fix empty and nonexistent file error * remove redundant new * replace println with tracing * show underlying error in custom error message * chore: cargo fmt * change AsRef<Path> to &Path * remove ineffective dedups * chore: cargo fmt * switch out Vec<Enr<K>> for HashSet<Enr<K>> * cargo fmt * use tempdir instead of of std::env::temp_dir * refactor anchor to contain &Path instead of File * change new_from_file to explicitly include logic for opening existing files, rather than calling out to from_toml * remove from_toml because new_from_file handles existing files properly with only a path. It is not possible to obtain a Path from a File anyways, its only purpose was to accept a File type * use PathBuf instead of Path Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
This commit is contained in:
@ -8,3 +8,16 @@ readme = "README.md"
|
||||
description = "Utilities for interacting with ethereum's peer to peer network."
|
||||
|
||||
[dependencies]
|
||||
enr = { git = "https://github.com/sigp/enr", features = ["serde", "rust-secp256k1"] }
|
||||
serde = "1.0.145"
|
||||
serde_derive = "1.0.145"
|
||||
thiserror = "1.0.37"
|
||||
toml = "0.5.9"
|
||||
tracing = "0.1.36"
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.3.0"
|
||||
|
||||
[dev-dependencies.secp256k1]
|
||||
version = "0.24"
|
||||
features = ["rand-std"]
|
||||
|
||||
Reference in New Issue
Block a user