From 6e7efb5feff4e807bcfe00b3f18155fe4dd54bde Mon Sep 17 00:00:00 2001 From: tomusdrw Date: Wed, 6 Jun 2018 00:33:16 +0800 Subject: [PATCH] Disallow unsigned transactions in case EIP-86 is disabled --- ethcore/transaction/src/transaction.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ethcore/transaction/src/transaction.rs b/ethcore/transaction/src/transaction.rs index f206c549a..a117af551 100644 --- a/ethcore/transaction/src/transaction.rs +++ b/ethcore/transaction/src/transaction.rs @@ -392,6 +392,10 @@ impl UnverifiedTransaction { if check_low_s && !(allow_empty_signature && self.is_unsigned()) { self.check_low_s()?; } + // Disallow unsigned transactions in case EIP-86 is disabled. + if !allow_empty_signature && self.is_unsigned() { + return Err(ethkey::Error::InvalidSignature.into()); + } // EIP-86: Transactions of this form MUST have gasprice = 0, nonce = 0, value = 0, and do NOT increment the nonce of account 0. if allow_empty_signature && self.is_unsigned() && !(self.gas_price.is_zero() && self.value.is_zero() && self.nonce.is_zero()) { return Err(ethkey::Error::InvalidSignature.into())