From 19710f19ad3fb01277aab10ab6b07d5cac5dd50f Mon Sep 17 00:00:00 2001 From: ltitanb Date: Thu, 5 Dec 2024 12:06:39 +0000 Subject: [PATCH] param index fix --- crates/database/src/postgres/postgres_db_service.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/database/src/postgres/postgres_db_service.rs b/crates/database/src/postgres/postgres_db_service.rs index 100b1af..a64dd63 100644 --- a/crates/database/src/postgres/postgres_db_service.rs +++ b/crates/database/src/postgres/postgres_db_service.rs @@ -1456,6 +1456,7 @@ impl DatabaseService for PostgresDatabaseService { if let Some(block_hash) = filters.block_hash() { query.push_str(&format!(" AND block_submission.block_hash = ${}", param_index)); params.push(Box::new(block_hash)); + param_index += 1; } if let Some(filtering) = filtering { @@ -1464,7 +1465,6 @@ impl DatabaseService for PostgresDatabaseService { param_index )); params.push(Box::new(filtering)); - param_index += 1; } let params_refs: Vec<&(dyn ToSql + Sync)> =