Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(torii): add flag for indexing everything #1816

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bin/torii/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@
/// Chunk size of the events page when indexing using events
#[arg(long, default_value = "1000")]
events_chunk_size: u64,

/// Index all blocks and transactions
#[arg(long, default_value = "false")]
all: bool,

Check warning on line 115 in bin/torii/src/main.rs

View check run for this annotation

Codecov / codecov/patch

bin/torii/src/main.rs#L115

Added line #L115 was not covered by tests
}

#[tokio::main]
Expand Down Expand Up @@ -179,6 +183,7 @@
EngineConfig {
start_block: args.start_block,
events_chunk_size: args.events_chunk_size,
index_all: args.all,

Check warning on line 186 in bin/torii/src/main.rs

View check run for this annotation

Codecov / codecov/patch

bin/torii/src/main.rs#L186

Added line #L186 was not covered by tests
..Default::default()
},
shutdown_tx.clone(),
Expand Down
3 changes: 2 additions & 1 deletion crates/torii/core/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ pub struct EngineConfig {
pub block_time: Duration,
pub start_block: u64,
pub events_chunk_size: u64,
pub index_all: bool,
}

impl Default for EngineConfig {
fn default() -> Self {
Self { block_time: Duration::from_secs(1), start_block: 0, events_chunk_size: 1000 }
Self { block_time: Duration::from_secs(1), start_block: 0, events_chunk_size: 1000, index_all: false }
}
}

Expand Down
Loading