Bootstrap geth Rust workspace
This commit is contained in:
commit
26f81ff1ef
73 changed files with 4835 additions and 0 deletions
11
crates/geth-testkit/Cargo.toml
Normal file
11
crates/geth-testkit/Cargo.toml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "geth-testkit"
|
||||
version = "0.1.0"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
tempfile.workspace = true
|
||||
geth-config = { path = "../geth-config" }
|
||||
geth-node = { path = "../geth-node" }
|
||||
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