Skip to content
Merged
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
11 changes: 10 additions & 1 deletion rust_hft/tools/collector/src/bin/polymarket-raw-ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use hft_collector::polymarket_parity::{verify_shadow_parity, ShadowParityConfig}
use hft_collector::polymarket_raw::{
finalize_reference_tape, run_reference, ReferenceConfig, DEFAULT_MAX_CONCURRENT_TRADE_POLLS,
DEFAULT_MAX_MARKETS_PER_LANE,
DEFAULT_MAX_RETAINED_TRADE_IDS, DEFAULT_MAX_TRADE_POLLS_PER_CYCLE,
DEFAULT_MAX_RETAINED_TRADE_IDS, DEFAULT_MAX_TRADE_POLLS_PER_CYCLE, DEFAULT_TAPE_MAX_BYTES,
};
use hft_collector::polymarket_research_import::{
validate_research_segments, ArtifactTriplet, ResearchSegmentValidationConfig,
Expand Down Expand Up @@ -76,6 +76,8 @@ enum Command {
trade_finalization_stable_polls: u64,
#[arg(long, default_value_t = 100)]
per_market_delay_ms: u64,
#[arg(long, default_value_t = DEFAULT_TAPE_MAX_BYTES)]
tape_max_bytes: u64,
#[arg(long)]
once: bool,
},
Expand Down Expand Up @@ -235,6 +237,7 @@ async fn run(cli: Cli) -> Result<()> {
trade_finalization_lag_secs,
trade_finalization_stable_polls,
per_market_delay_ms,
tape_max_bytes,
once,
} => {
let config = ReferenceConfig {
Expand All @@ -253,6 +256,7 @@ async fn run(cli: Cli) -> Result<()> {
trade_finalization_lag_secs,
trade_finalization_stable_polls,
per_market_delay: Duration::from_millis(per_market_delay_ms),
tape_max_bytes,
};
run_reference(config, once).await
}
Expand Down Expand Up @@ -413,6 +417,7 @@ mod tests {
max_retained_trade_ids,
max_trade_polls_per_cycle,
max_concurrent_trade_polls,
tape_max_bytes,
..
} = command
else {
Expand All @@ -431,6 +436,10 @@ mod tests {
max_concurrent_trade_polls,
ReferenceConfig::default().max_concurrent_trade_polls
);
assert_eq!(
tape_max_bytes,
ReferenceConfig::default().tape_max_bytes
);
}

#[test]
Expand Down
Loading
Loading