mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Breaking changes (#5191)
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com> Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com> Co-authored-by: joshieDo <ranriver@protonmail.com> Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me> Co-authored-by: Thomas Coratger <thomas.coratger@gmail.com>
This commit is contained in:
@ -36,12 +36,11 @@ pub mod myrpc_ext;
|
||||
#[tokio::main]
|
||||
async fn main() -> eyre::Result<()> {
|
||||
// 1. Setup the DB
|
||||
let db = Arc::new(open_db_read_only(
|
||||
Path::new(&std::env::var("RETH_DB_PATH")?),
|
||||
Default::default(),
|
||||
)?);
|
||||
let db_path = std::env::var("RETH_DB_PATH")?;
|
||||
let db_path = Path::new(&db_path);
|
||||
let db = Arc::new(open_db_read_only(db_path.join("db").as_path(), Default::default())?);
|
||||
let spec = Arc::new(ChainSpecBuilder::mainnet().build());
|
||||
let factory = ProviderFactory::new(db.clone(), spec.clone());
|
||||
let factory = ProviderFactory::new(db.clone(), spec.clone(), db_path.join("static_files"))?;
|
||||
|
||||
// 2. Setup the blockchain provider using only the database provider and a noop for the tree to
|
||||
// satisfy trait bounds. Tree is not used in this example since we are only operating on the
|
||||
|
||||
Reference in New Issue
Block a user