Skip to content

Commit

Permalink
graph, store: Rename func to be consistent with the rest of the code
Browse files Browse the repository at this point in the history
  • Loading branch information
tilacog committed Jul 6, 2021
1 parent 16c793d commit 91fdcaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions graph/src/components/transaction_receipt.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Code for retrieving transaction receipts from the database.
//!
//! This module exposes:
//! 1. the [`find_transaction_receipts_for_block_range`] function, that queries the database and returns
//! transaction receipts for a given block range.
//! 1. the [`find_transaction_receipts_in_block`] function, that queries the database and returns
//! transaction receipts present in a given block.
//! 2. the [`LightTransactionReceipt`] type, which holds basic information about the retrieved
//! transaction receipts.
Expand Down Expand Up @@ -170,7 +170,7 @@ impl TryFrom<RawTransactionReceipt> for LightTransactionReceipt {
}

/// Queries the database for all the transaction receipts in a given block range.
pub fn find_transaction_receipts_for_block(
pub fn find_transaction_receipts_in_block(
conn: &PgConnection,
chain_name: &str,
block_hash: &H256,
Expand Down
10 changes: 5 additions & 5 deletions store/postgres/src/chain_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ mod data {
use graph::{
constraint_violation,
prelude::{
transaction_receipt::{find_transaction_receipts_for_block, LightTransactionReceipt},
transaction_receipt::{find_transaction_receipts_in_block, LightTransactionReceipt},
StoreError,
},
};
Expand Down Expand Up @@ -1088,14 +1088,14 @@ mod data {
.unwrap();
}

/// Delegates to [`transaction_receipt::find_transaction_receipts_for_block`].
pub(crate) fn find_transaction_receipts_for_block(
/// Delegates to [`transaction_receipt::find_transaction_receipts_in_block`].
pub(crate) fn find_transaction_receipts_in_block(
&self,
conn: &PgConnection,
chain_name: &str,
block_hash: &H256,
) -> anyhow::Result<Vec<LightTransactionReceipt>> {
find_transaction_receipts_for_block(conn, chain_name, block_hash)
find_transaction_receipts_in_block(conn, chain_name, block_hash)
}
}
}
Expand Down Expand Up @@ -1439,7 +1439,7 @@ impl ChainStoreTrait for ChainStore {
) -> Result<Vec<LightTransactionReceipt>, StoreError> {
let conn = self.get_conn()?;
self.storage
.find_transaction_receipts_for_block(&conn, &self.chain, &block_hash)
.find_transaction_receipts_in_block(&conn, &self.chain, &block_hash)
.map_err(|e| e.into())
}
}
Expand Down

0 comments on commit 91fdcaa

Please sign in to comment.