Bootstrap geth Rust workspace
This commit is contained in:
commit
26f81ff1ef
73 changed files with 4835 additions and 0 deletions
14
crates/geth-testkit/src/lib.rs
Normal file
14
crates/geth-testkit/src/lib.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
use tempfile::TempDir;
|
||||
|
||||
pub struct TestHome {
|
||||
_dir: TempDir,
|
||||
pub paths: geth_config::GethPaths,
|
||||
}
|
||||
|
||||
impl TestHome {
|
||||
pub fn new() -> std::io::Result<Self> {
|
||||
let dir = tempfile::tempdir()?;
|
||||
let paths = geth_config::GethPaths::from_home(dir.path());
|
||||
Ok(Self { _dir: dir, paths })
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue