diff --git a/ethcore/src/machine.rs b/ethcore/src/machine.rs index c74cc6bf4..47cea8505 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine.rs @@ -371,11 +371,11 @@ impl EthereumMachine { } /// Does verification of the transaction against the parent state. - pub fn verify_transaction(&self, t: &SignedTransaction, header: &Header, client: &C) + pub fn verify_transaction(&self, t: &SignedTransaction, parent: &Header, client: &C) -> Result<(), transaction::Error> { if let Some(ref filter) = self.tx_filter.as_ref() { - if !filter.transaction_allowed(header.parent_hash(), header.number(), t, client) { + if !filter.transaction_allowed(&parent.hash(), parent.number() + 1, t, client) { return Err(transaction::Error::NotAllowed.into()) } } diff --git a/ethcore/src/verification/verification.rs b/ethcore/src/verification/verification.rs index 2d8c17a67..3bfe30a44 100644 --- a/ethcore/src/verification/verification.rs +++ b/ethcore/src/verification/verification.rs @@ -147,7 +147,9 @@ pub fn verify_block_family(header: &Header, parent: verify_uncles(params.block, params.block_provider, engine)?; for tx in ¶ms.block.transactions { - engine.machine().verify_transaction(tx, header, params.client)?; + // transactions are verified against the parent header since the current + // state wasn't available when the tx was created + engine.machine().verify_transaction(tx, parent, params.client)?; } Ok(())