Passing verify tx errors to the caller

This commit is contained in:
Vlad Lupashevskyi 2017-12-23 00:00:27 +02:00
parent 0d5603eece
commit 31ffb467f5

View File

@ -699,10 +699,7 @@ impl Miner {
},
Ok(transaction) => {
// This check goes here because verify_transaction takes SignedTransaction parameter
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));
}
self.engine.machine().verify_transaction(&transaction, &best_block_header, client.as_block_chain_client())?;
let origin = self.accounts.as_ref().and_then(|accounts| {
match accounts.has_account(transaction.sender()).unwrap_or(false) {