Delayed transactions

This commit is contained in:
arkpar
2016-12-15 18:19:19 +01:00
parent 339b889ac4
commit 2952ea1b85
29 changed files with 387 additions and 222 deletions

View File

@@ -24,7 +24,7 @@ use ethcore::service::ClientIoMessage;
use ethcore::block_import_error::BlockImportError;
use ethcore::block_status::BlockStatus;
use ethcore::verification::queue::{HeaderQueue, QueueInfo};
use ethcore::transaction::SignedTransaction;
use ethcore::transaction::{SignedTransaction, PendingTransaction};
use ethcore::blockchain_info::BlockChainInfo;
use io::IoChannel;
@@ -114,7 +114,7 @@ impl Provider for Client {
Vec::new()
}
fn pending_transactions(&self) -> Vec<SignedTransaction> {
fn pending_transactions(&self) -> Vec<PendingTransaction> {
Vec::new()
}
}
}

View File

@@ -20,7 +20,7 @@
use ethcore::blockchain_info::BlockChainInfo;
use ethcore::client::{BlockChainClient, EachBlockWith, TestBlockChainClient};
use ethcore::ids::BlockId;
use ethcore::transaction::SignedTransaction;
use ethcore::transaction::PendingTransaction;
use network::{PeerId, NodeId};
use net::buffer_flow::FlowParams;
@@ -169,7 +169,7 @@ impl Provider for TestProvider {
req.requests.into_iter().map(|_| ::rlp::EMPTY_LIST_RLP.to_vec()).collect()
}
fn pending_transactions(&self) -> Vec<SignedTransaction> {
fn pending_transactions(&self) -> Vec<PendingTransaction> {
self.0.client.pending_transactions()
}
}

View File

@@ -19,7 +19,7 @@
use ethcore::blockchain_info::BlockChainInfo;
use ethcore::client::{BlockChainClient, ProvingBlockChainClient};
use ethcore::transaction::SignedTransaction;
use ethcore::transaction::PendingTransaction;
use ethcore::ids::BlockId;
use util::{Bytes, H256};
@@ -79,7 +79,7 @@ pub trait Provider: Send + Sync {
fn header_proofs(&self, req: request::HeaderProofs) -> Vec<Bytes>;
/// Provide pending transactions.
fn pending_transactions(&self) -> Vec<SignedTransaction>;
fn pending_transactions(&self) -> Vec<PendingTransaction>;
}
// Implementation of a light client data provider for a client.
@@ -178,7 +178,7 @@ impl<T: ProvingBlockChainClient + ?Sized> Provider for T {
req.requests.into_iter().map(|_| ::rlp::EMPTY_LIST_RLP.to_vec()).collect()
}
fn pending_transactions(&self) -> Vec<SignedTransaction> {
fn pending_transactions(&self) -> Vec<PendingTransaction> {
BlockChainClient::pending_transactions(self)
}
}
}