Skip to content

Commit 1030854

Browse files
committed
graph, store: Rename func to be consistent with the rest of the code
1 parent c4d36fc commit 1030854

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

graph/src/components/transaction_receipt.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! Code for retrieving transaction receipts from the database.
22
//!
33
//! This module exposes:
4-
//! 1. the [`find_transaction_receipts_for_block_range`] function, that queries the database and returns
5-
//! transaction receipts for a given block range.
4+
//! 1. the [`find_transaction_receipts_in_block`] function, that queries the database and returns
5+
//! transaction receipts present in a given block.
66
//! 2. the [`LightTransactionReceipt`] type, which holds basic information about the retrieved
77
//! transaction receipts.
88
@@ -170,7 +170,7 @@ impl TryFrom<RawTransactionReceipt> for LightTransactionReceipt {
170170
}
171171

172172
/// Queries the database for all the transaction receipts in a given block range.
173-
pub fn find_transaction_receipts_for_block(
173+
pub fn find_transaction_receipts_in_block(
174174
conn: &PgConnection,
175175
chain_name: &str,
176176
block_hash: &H256,

store/postgres/src/chain_store.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ mod data {
6666
use graph::{
6767
constraint_violation,
6868
prelude::{
69-
transaction_receipt::{find_transaction_receipts_for_block, LightTransactionReceipt},
69+
transaction_receipt::{find_transaction_receipts_in_block, LightTransactionReceipt},
7070
StoreError,
7171
},
7272
};
@@ -1088,14 +1088,14 @@ mod data {
10881088
.unwrap();
10891089
}
10901090

1091-
/// Delegates to [`transaction_receipt::find_transaction_receipts_for_block`].
1092-
pub(crate) fn find_transaction_receipts_for_block(
1091+
/// Delegates to [`transaction_receipt::find_transaction_receipts_in_block`].
1092+
pub(crate) fn find_transaction_receipts_in_block(
10931093
&self,
10941094
conn: &PgConnection,
10951095
chain_name: &str,
10961096
block_hash: &H256,
10971097
) -> anyhow::Result<Vec<LightTransactionReceipt>> {
1098-
find_transaction_receipts_for_block(conn, chain_name, block_hash)
1098+
find_transaction_receipts_in_block(conn, chain_name, block_hash)
10991099
}
11001100
}
11011101
}
@@ -1439,7 +1439,7 @@ impl ChainStoreTrait for ChainStore {
14391439
) -> Result<Vec<LightTransactionReceipt>, StoreError> {
14401440
let conn = self.get_conn()?;
14411441
self.storage
1442-
.find_transaction_receipts_for_block(&conn, &self.chain, &block_hash)
1442+
.find_transaction_receipts_in_block(&conn, &self.chain, &block_hash)
14431443
.map_err(|e| e.into())
14441444
}
14451445
}

0 commit comments

Comments
 (0)