readme: update

This commit is contained in:
nym21
2025-03-03 10:52:07 +01:00
parent be2012f28d
commit 0ebaf6a171
7 changed files with 28 additions and 31 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ use brk_indexer::Indexer;
use brk_query::Params as QueryArgs;
use clap::{Parser, Subcommand};
use query::query;
use run::{RunArgs, run};
use run::{RunConfig, run};
mod query;
mod run;
@@ -21,7 +21,7 @@ struct Cli {
#[derive(Subcommand, Debug)]
enum Commands {
/// Run the indexer, computer and server
Run(RunArgs),
Run(RunConfig),
/// Query generated datasets via the `run` command in a similar fashion as the server's API
Query(QueryArgs),
}
@@ -40,7 +40,7 @@ fn main() -> color_eyre::Result<()> {
let computer = Computer::import(&outputs_dir.join("computed"))?;
match &cli.command {
Commands::Run(_) => run(indexer, computer),
Commands::Run(args) => run(indexer, computer, args),
Commands::Query(args) => query(indexer, computer, args),
}
}
+2 -2
View File
@@ -9,11 +9,11 @@ use clap::Parser;
use log::info;
#[derive(Parser, Debug)]
pub struct RunArgs {
pub struct RunConfig {
name: Option<String>,
}
pub fn run(mut indexer: Indexer, mut computer: Computer) -> color_eyre::Result<()> {
pub fn run(mut indexer: Indexer, mut computer: Computer, config: &RunConfig) -> color_eyre::Result<()> {
let data_dir = Path::new("../../../bitcoin");
let rpc = Box::leak(Box::new(rpc::Client::new(