From 3dbe09e9f6f5406ec0b6c9812e4fb0317c3f0eee Mon Sep 17 00:00:00 2001 From: Jeb Bearer Date: Wed, 9 Oct 2024 16:01:34 -0600 Subject: [PATCH] Add LIMIT 1 to query --- src/data_source/storage/sql/query/state.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data_source/storage/sql/query/state.rs b/src/data_source/storage/sql/query/state.rs index dc39ff1fc..f69273db8 100644 --- a/src/data_source/storage/sql/query/state.rs +++ b/src/data_source/storage/sql/query/state.rs @@ -292,7 +292,8 @@ impl<'a> Transaction<'a> { &format!( "SELECT {header_state_commitment_field} AS root_commmitment FROM header - WHERE height = $1" + WHERE height = $1 + LIMIT 1" ), [sql_param(&created)], )