Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Client::transaction -> Client::block_transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
vorot93 committed Apr 24, 2020
1 parent f8b22e2 commit b2ea4b7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ethcore/client-traits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ pub trait BlockChainClient:
fn list_storage(&self, id: BlockId, account: &Address, after: Option<&H256>, count: Option<u64>) -> Option<Vec<H256>>;

/// Get transaction with given hash.
fn transaction(&self, id: TransactionId) -> Option<LocalizedTransaction>;
fn block_transaction(&self, id: TransactionId) -> Option<LocalizedTransaction>;

/// Get pool transaction with a given hash.
fn pooled_transaction(&self, hash: H256) -> Option<Arc<VerifiedTransaction>>;
Expand Down
2 changes: 1 addition & 1 deletion ethcore/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1885,7 +1885,7 @@ impl BlockChainClient for Client {
Some(keys)
}

fn transaction(&self, id: TransactionId) -> Option<LocalizedTransaction> {
fn block_transaction(&self, id: TransactionId) -> Option<LocalizedTransaction> {
self.transaction_address(id).and_then(|address| self.chain.read().transaction(&address))
}

Expand Down
2 changes: 1 addition & 1 deletion ethcore/src/test_helpers/test_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ impl BlockChainClient for TestBlockChainClient {
fn list_storage(&self, _id: BlockId, _account: &Address, _after: Option<&H256>, _count: Option<u64>) -> Option<Vec<H256>> {
None
}
fn transaction(&self, _id: TransactionId) -> Option<LocalizedTransaction> {
fn block_transaction(&self, _id: TransactionId) -> Option<LocalizedTransaction> {
None // Simple default.
}
fn pooled_transaction(&self, _hash: H256) -> Option<Arc<VerifiedTransaction>> {
Expand Down
2 changes: 1 addition & 1 deletion rpc/src/v1/impls/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM, T> EthClient<C, SN, S, M, EM> where
}

fn transaction(&self, id: PendingTransactionId) -> Result<Option<Transaction>> {
let client_transaction = |id| match self.client.transaction(id) {
let client_transaction = |id| match self.client.block_transaction(id) {
Some(t) => Ok(Some(Transaction::from_localized(t))),
None => Ok(None),
};
Expand Down

0 comments on commit b2ea4b7

Please sign in to comment.