Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Disallow unsigned transactions in case EIP-86 is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
tomusdrw authored and sorpaas committed Jun 5, 2018
1 parent 5d6a0d4 commit 293525b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ethcore/transaction/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,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())
Expand Down

0 comments on commit 293525b

Please sign in to comment.