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

Commit

Permalink
pooled_transaction -> queued_transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
vorot93 committed May 15, 2020
1 parent e4c57d4 commit f20fd98
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 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 @@ -288,7 +288,7 @@ pub trait BlockChainClient:
fn block_transaction(&self, id: TransactionId) -> Option<LocalizedTransaction>;

/// Get pool transaction with a given hash.
fn pooled_transaction(&self, hash: H256) -> Option<Arc<VerifiedTransaction>>;
fn queued_transaction(&self, hash: H256) -> Option<Arc<VerifiedTransaction>>;

/// Get uncle with given id.
fn uncle(&self, id: UncleId) -> Option<encoded::Header>;
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 @@ -1889,7 +1889,7 @@ impl BlockChainClient for Client {
self.transaction_address(id).and_then(|address| self.chain.read().transaction(&address))
}

fn pooled_transaction(&self, hash: H256) -> Option<Arc<VerifiedTransaction>> {
fn queued_transaction(&self, hash: H256) -> Option<Arc<VerifiedTransaction>> {
self.importer.miner.transaction(&hash)
}

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 @@ -741,7 +741,7 @@ impl BlockChainClient for TestBlockChainClient {
fn block_transaction(&self, _id: TransactionId) -> Option<LocalizedTransaction> {
None // Simple default.
}
fn pooled_transaction(&self, _hash: H256) -> Option<Arc<VerifiedTransaction>> {
fn queued_transaction(&self, _hash: H256) -> Option<Arc<VerifiedTransaction>> {
None
}

Expand Down
2 changes: 1 addition & 1 deletion ethcore/sync/src/chain/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ impl SyncHandler {
for item in tx_rlp {
let hash = item.as_val::<H256>().map_err(|_| DownloaderImportError::Invalid)?;

if io.chain().pooled_transaction(hash).is_none() {
if io.chain().queued_transaction(hash).is_none() {
let unfetched = sync.unfetched_pooled_transactions.entry(hash).or_insert_with(|| super::UnfetchedTransaction {
announcer: peer_id,
next_fetch: Instant::now(),
Expand Down
2 changes: 1 addition & 1 deletion ethcore/sync/src/chain/supplier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ impl SyncSupplier {
const LIMIT: usize = 256;

let transactions = r.iter().take(LIMIT).filter_map(|v| {
v.as_val::<H256>().ok().and_then(|hash| io.chain().pooled_transaction(hash))
v.as_val::<H256>().ok().and_then(|hash| io.chain().queued_transaction(hash))
}).collect::<Vec<_>>();

let added = transactions.len();
Expand Down

0 comments on commit f20fd98

Please sign in to comment.