diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index d9d4570a72a..3115239ad04 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -494,7 +494,7 @@ impl Miner { let sender = transaction.sender(); // Re-verify transaction again vs current state. - let result = client.verify_signed(&transaction) + let result = client.verify_for_pending_block(&transaction, &open_block.header) .map_err(|e| e.into()) .and_then(|_| { open_block.push_transaction(transaction, None) diff --git a/ethcore/src/miner/pool_client.rs b/ethcore/src/miner/pool_client.rs index 60e93dee8ac..93cc0e8cfb4 100644 --- a/ethcore/src/miner/pool_client.rs +++ b/ethcore/src/miner/pool_client.rs @@ -113,11 +113,13 @@ impl<'a, C: 'a> PoolClient<'a, C> where } } - /// Verifies if signed transaction is executable. + /// 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. - pub fn verify_signed(&self, tx: &SignedTransaction) -> Result<(), transaction::Error> { - self.engine.machine().verify_transaction(&tx, &self.best_block_header, self.chain) + pub fn verify_for_pending_block(&self, tx: &SignedTransaction, header: &Header) -> Result<(), transaction::Error> { + self.engine.machine().verify_transaction_basic(tx, header)?; + self.engine.machine().verify_transaction(tx, &self.best_block_header, self.chain) } } @@ -138,8 +140,7 @@ impl<'a, C: 'a> pool::client::Client for PoolClient<'a, C> where self.engine.verify_transaction_basic(&tx, &self.best_block_header)?; let tx = self.engine.verify_transaction_unordered(tx, &self.best_block_header)?; - self.verify_signed(&tx)?; - + self.engine.machine().verify_transaction(&tx, &self.best_block_header, self.chain)?; Ok(tx) }