diff --git a/graph-gateway/Cargo.toml b/graph-gateway/Cargo.toml index 016450af..dd799b6b 100644 --- a/graph-gateway/Cargo.toml +++ b/graph-gateway/Cargo.toml @@ -19,7 +19,7 @@ gateway-common = { path = "../gateway-common" } gateway-framework = { path = "../gateway-framework" } graphql.workspace = true headers = "0.3.9" -indexer-selection = { git = "https://github.com/edgeandnode/candidate-selection", rev = "bcd7909" } +indexer-selection = { git = "https://github.com/edgeandnode/candidate-selection", rev = "2c48a9b" } indoc = "2.0.5" itertools = "0.12.1" num-traits = "0.2.18" diff --git a/graph-gateway/src/client_query.rs b/graph-gateway/src/client_query.rs index 88f956bd..e1ecd274 100644 --- a/graph-gateway/src/client_query.rs +++ b/graph-gateway/src/client_query.rs @@ -351,7 +351,6 @@ async fn handle_client_query_inner( &block_requirements, chain_head, blocks_per_minute, - grt_per_usd, budget, indexing, ) { @@ -552,7 +551,6 @@ fn prepare_candidate( block_requirements: &BlockRequirements, chain_head: BlockNumber, blocks_per_minute: u64, - grt_per_usd: NotNan, budget: u128, indexing: Indexing, ) -> Result { @@ -582,11 +580,6 @@ fn prepare_candidate( } } - let slashable_usd = ((info.staked_tokens as f64 * 1e-18) / *grt_per_usd) as u64; - if slashable_usd == 0 { - return Err(IndexerError::Unavailable(NoStake)); - } - Ok(Candidate { indexer: indexing.indexer, deployment: indexing.deployment, @@ -594,7 +587,7 @@ fn prepare_candidate( perf: perf.response, fee, seconds_behind: perf.seconds_behind, - slashable_usd, + slashable_grt: (info.staked_tokens as f64 * 1e-18) as u64, subgraph_versions_behind: *versions_behind.get(&indexing.deployment).unwrap_or(&0), zero_allocation: info.allocated_tokens == 0, })