Struct ethcore::miner::pool_client::PoolClient
source · [−]pub struct PoolClient<'a, C: 'a> { /* private fields */ }
Expand description
Blockchain accesss for transaction pool.
Implementations
sourceimpl<'a, C: 'a> PoolClient<'a, C> where
C: BlockInfo + CallContract,
impl<'a, C: 'a> PoolClient<'a, C> where
C: BlockInfo + CallContract,
sourcepub fn new(
chain: &'a C,
cached_nonces: &'a Cache<Address, U256>,
cached_balances: &'a Cache<Address, U256>,
engine: &'a dyn EthEngine,
accounts: &'a dyn LocalAccounts,
service_transaction_checker: Option<&'a ServiceTransactionChecker>
) -> Self
pub fn new(
chain: &'a C,
cached_nonces: &'a Cache<Address, U256>,
cached_balances: &'a Cache<Address, U256>,
engine: &'a dyn EthEngine,
accounts: &'a dyn LocalAccounts,
service_transaction_checker: Option<&'a ServiceTransactionChecker>
) -> Self
Creates new client given chain, nonce cache, accounts and service transaction verifier.
sourcepub fn verify_for_pending_block(
&self,
tx: &SignedTransaction,
header: &Header
) -> Result<(), Error>
pub fn verify_for_pending_block(
&self,
tx: &SignedTransaction,
header: &Header
) -> Result<(), Error>
Verifies transaction against its block (before its import into this block) Also Verifies if signed transaction is executable.
This should perform any verifications that rely on chain status.
Trait Implementations
sourceimpl<'a, C: 'a> BalanceClient for PoolClient<'a, C> where
C: Balance + Sync,
impl<'a, C: 'a> BalanceClient for PoolClient<'a, C> where
C: Balance + Sync,
sourcefn account_balance(&self, address: &H160) -> U256
fn account_balance(&self, address: &H160) -> U256
Fetch only account balance for given sender.
sourceimpl<'a, C: 'a> Client for PoolClient<'a, C> where
C: TransactionVerifierClient + Sync,
impl<'a, C: 'a> Client for PoolClient<'a, C> where
C: TransactionVerifierClient + Sync,
sourcefn transaction_already_included(&self, hash: &H256) -> bool
fn transaction_already_included(&self, hash: &H256) -> bool
Is transaction with given hash already in the blockchain?
sourcefn verify_transaction_basic(
&self,
tx: &UnverifiedTransaction
) -> Result<(), Error>
fn verify_transaction_basic(
&self,
tx: &UnverifiedTransaction
) -> Result<(), Error>
Perform basic/cheap transaction verification. Read more
sourcefn verify_transaction(
&self,
tx: UnverifiedTransaction
) -> Result<SignedTransaction, Error>
fn verify_transaction(
&self,
tx: UnverifiedTransaction
) -> Result<SignedTransaction, Error>
Structurarily verify given transaction.
sourcefn account_details(&self, address: &Address) -> AccountDetails
fn account_details(&self, address: &Address) -> AccountDetails
Fetch account details for given sender.
sourcefn required_gas(&self, tx: &Transaction) -> U256
fn required_gas(&self, tx: &Transaction) -> U256
Estimate minimal gas requirurement for given transaction.
sourcefn transaction_type(&self, tx: &SignedTransaction) -> TransactionType
fn transaction_type(&self, tx: &SignedTransaction) -> TransactionType
Classify transaction (check if transaction is filtered by some contracts).
sourcefn decode_transaction(
&self,
transaction: &[u8]
) -> Result<UnverifiedTransaction, Error>
fn decode_transaction(
&self,
transaction: &[u8]
) -> Result<UnverifiedTransaction, Error>
Performs pre-validation of RLP decoded transaction
sourceimpl<'a, C: 'a> Clone for PoolClient<'a, C>
impl<'a, C: 'a> Clone for PoolClient<'a, C>
sourceimpl<'a, C: 'a> Debug for PoolClient<'a, C>
impl<'a, C: 'a> Debug for PoolClient<'a, C>
sourceimpl<'a, C: 'a> NonceClient for PoolClient<'a, C> where
C: Nonce + Sync,
impl<'a, C: 'a> NonceClient for PoolClient<'a, C> where
C: Nonce + Sync,
sourcefn account_nonce(&self, address: &Address) -> U256
fn account_nonce(&self, address: &Address) -> U256
Fetch only account nonce for given sender.
Auto Trait Implementations
impl<'a, C> !RefUnwindSafe for PoolClient<'a, C>
impl<'a, C> Send for PoolClient<'a, C> where
C: Sync,
impl<'a, C> Sync for PoolClient<'a, C> where
C: Sync,
impl<'a, C> Unpin for PoolClient<'a, C>
impl<'a, C> !UnwindSafe for PoolClient<'a, C>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more