From 0d5603eeceb178fe652f68bf435aeae89187064f Mon Sep 17 00:00:00 2001 From: Vlad Lupashevskyi Date: Fri, 22 Dec 2017 23:14:24 +0200 Subject: [PATCH] Use is_err instead of match --- ethcore/src/miner/miner.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 35e00acef..06c35c5e4 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -699,12 +699,9 @@ impl Miner { }, 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)) => { + if self.engine.machine().verify_transaction(&transaction, &best_block_header, client.as_block_chain_client()).is_err() { debug!(target: "miner", "Rejected disallowed tx {:?}", hash); return Err(Error::Transaction(TransactionError::NotAllowed)); - } - _ => {} } let origin = self.accounts.as_ref().and_then(|accounts| {