Use is_err instead of match
This commit is contained in:
parent
d6ae6e315e
commit
0d5603eece
@ -699,13 +699,10 @@ impl Miner {
|
|||||||
},
|
},
|
||||||
Ok(transaction) => {
|
Ok(transaction) => {
|
||||||
// This check goes here because verify_transaction takes SignedTransaction parameter
|
// 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()) {
|
if self.engine.machine().verify_transaction(&transaction, &best_block_header, client.as_block_chain_client()).is_err() {
|
||||||
Err(Error::Transaction(TransactionError::NotAllowed)) => {
|
|
||||||
debug!(target: "miner", "Rejected disallowed tx {:?}", hash);
|
debug!(target: "miner", "Rejected disallowed tx {:?}", hash);
|
||||||
return Err(Error::Transaction(TransactionError::NotAllowed));
|
return Err(Error::Transaction(TransactionError::NotAllowed));
|
||||||
}
|
}
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
|
|
||||||
let origin = self.accounts.as_ref().and_then(|accounts| {
|
let origin = self.accounts.as_ref().and_then(|accounts| {
|
||||||
match accounts.has_account(transaction.sender()).unwrap_or(false) {
|
match accounts.has_account(transaction.sender()).unwrap_or(false) {
|
||||||
|
Loading…
Reference in New Issue
Block a user