Skip to content

Commit 0a9b34a

Browse files
committed
refactor: update file and remove unused function
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent 1f3f248 commit 0a9b34a

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

tap-agent/src/agent/sender_allocation.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,6 @@ impl AllocationConfig {
129129
escrow_polling_interval: config.escrow_polling_interval,
130130
}
131131
}
132-
133-
pub fn from_config(config: &indexer_config::Config) -> Self {
134-
Self {
135-
timestamp_buffer_ns: config.tap.rav_request.timestamp_buffer_secs.as_nanos() as u64,
136-
rav_request_receipt_limit: config.tap.rav_request.max_receipts_per_request,
137-
indexer_address: config.indexer.indexer_address,
138-
escrow_polling_interval: config.subgraphs.escrow.config.syncing_interval_secs,
139-
}
140-
}
141132
}
142133

143134
pub struct SenderAllocationArgs {

tap-agent/src/config.rs renamed to tap-agent/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn init_tracing(format: String) -> Result<(), SetGlobalDefaultError> {
3535
}
3636
}
3737

38-
pub fn from_cli() -> Result<IndexerConfig> {
38+
pub fn get_config() -> Result<IndexerConfig> {
3939
let cli = Cli::parse();
4040
let config = IndexerConfig::parse(ConfigPrefix::Tap, cli.config.as_ref()).map_err(|e| {
4141
error!(

tap-agent/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use lazy_static::lazy_static;
77
use tap_core::tap_eip712_domain;
88

99
lazy_static! {
10-
pub static ref CONFIG: Config = config::from_cli().expect("Failed to load configuration");
10+
pub static ref CONFIG: Config = cli::get_config().expect("Failed to load configuration");
1111
pub static ref EIP_712_DOMAIN: Eip712Domain = tap_eip712_domain(
1212
CONFIG.blockchain.chain_id as u64,
1313
CONFIG.blockchain.receipts_verifier_address,
@@ -17,7 +17,7 @@ lazy_static! {
1717
pub mod adaptative_concurrency;
1818
pub mod agent;
1919
pub mod backoff;
20-
pub mod config;
20+
pub mod cli;
2121
pub mod database;
2222
pub mod metrics;
2323
pub mod tap;

0 commit comments

Comments
 (0)