Passing verify tx errors to the caller
This commit is contained in:
parent
0d5603eece
commit
31ffb467f5
@ -699,10 +699,7 @@ 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
|
||||||
if self.engine.machine().verify_transaction(&transaction, &best_block_header, client.as_block_chain_client()).is_err() {
|
self.engine.machine().verify_transaction(&transaction, &best_block_header, client.as_block_chain_client())?;
|
||||||
debug!(target: "miner", "Rejected disallowed tx {:?}", hash);
|
|
||||||
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