feat(storage): replace Tree generic with Arc<dyn TreeViewer> (#7810)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Kyrylo Riabov
2024-04-23 22:10:45 +03:00
committed by GitHub
parent a8a434d2c4
commit c659e28aa0
9 changed files with 102 additions and 113 deletions

View File

@ -49,7 +49,7 @@ async fn main() -> eyre::Result<()> {
// 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
// disk and don't handle new blocks/live sync etc, which is done by the blockchain tree.
let provider = BlockchainProvider::new(factory, NoopBlockchainTree::default())?;
let provider = BlockchainProvider::new(factory, Arc::new(NoopBlockchainTree::default()))?;
let rpc_builder = RpcModuleBuilder::default()
.with_provider(provider.clone())