Skip to content

Commit 84fcc8c

Browse files
authored
fix database get_signature query (#464)
1 parent 6f497e8 commit 84fcc8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/database/db/src/operations.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,8 @@ impl<T: ReadConnectionProvider + Sync + ?Sized> DatabaseReadOperations for T {
14991499
async fn get_signature(&self, block_hash: B256) -> Result<Option<Signature>, DatabaseError> {
15001500
tracing::trace!(target: "scroll::db", block_hash = ?block_hash, "Retrieving block signature from database.");
15011501

1502-
let block_signature = models::block_signature::Entity::find_by_id(block_hash.to_vec())
1502+
let block_signature = models::block_signature::Entity::find()
1503+
.filter(models::block_signature::Column::BlockHash.eq(block_hash.to_vec()))
15031504
.one(self.get_connection())
15041505
.await?;
15051506

0 commit comments

Comments
 (0)