From d6ae6e315e6cc42ea1151ed48a33460a2b72e5fe Mon Sep 17 00:00:00 2001 From: Vlad Lupashevskyi Date: Fri, 22 Dec 2017 22:50:09 +0200 Subject: [PATCH] Check tx-type before importing transactions to the queue --- ethcore/src/miner/miner.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 9868edbfd..35e00acef 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -698,6 +698,15 @@ impl Miner { Err(e) }, Ok(transaction) => { + // This check goes here because verify_transaction takes SignedTransaction parameter + match self.engine.machine().verify_transaction(&transaction, &best_block_header, client.as_block_chain_client()) { + Err(Error::Transaction(TransactionError::NotAllowed)) => { + debug!(target: "miner", "Rejected disallowed tx {:?}", hash); + return Err(Error::Transaction(TransactionError::NotAllowed)); + } + _ => {} + } + let origin = self.accounts.as_ref().and_then(|accounts| { match accounts.has_account(transaction.sender()).unwrap_or(false) { true => Some(TransactionOrigin::Local),