-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
@@ -72,8 +72,8 @@ pub struct Transaction { | |||
|
|||
impl Transaction { | |||
/// Append object with a without signature into RLP stream | |||
pub fn rlp_append_unsigned_transaction(&self, s: &mut RlpStream) { | |||
s.begin_list(6); | |||
pub fn rlp_append_unsigned_transaction(&self, s: &mut RlpStream, network_id: Option<u8>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be made private so that it is not misused for RLP serialization
@@ -295,8 +307,16 @@ impl SignedTransaction { | |||
} | |||
} | |||
|
|||
/// 0 is `v` is 27, 1 if 28, and 4 otherwise. | |||
pub fn standard_v(&self) -> u8 { match self.v { 27 => 0, 28 => 1, _ => 4 } } | |||
/// 0 if `v` is 27, 1 if 28 or 4 if invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment needs updating
All these spec file keys are gonna be a bit hellish for users to migrate their private chains. |
Global, | ||
Local(u8), | ||
Either(u8), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why's this commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs removing.
@@ -45,10 +50,20 @@ impl Substate { | |||
/// Merge secondary substate `s` into self, accruing each element correspondingly. | |||
pub fn accrue(&mut self, s: Substate) { | |||
self.suicides.extend(s.suicides.into_iter()); | |||
self.garbage.extend(s.garbage.into_iter()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it guaranteed that the union of two substates won't contain the same address in two sets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(in expected usage)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, but then it also doesn't matter.
stream.out().sha3() | ||
} | ||
|
||
/// Signs the transaction as coming from `sender`. | ||
pub fn sign(self, secret: &Secret) -> SignedTransaction { | ||
let sig = ::ethkey::sign(secret, &self.hash()) | ||
pub fn sign(self, secret: &Secret, network_id: Option<u8>) -> SignedTransaction { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a convenience function sign_standard
= sign(secret, None)
would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sign_standard
would be a misnomer since not providing a network ID is not a "standard" - could be sign_without_network_id
, but then i think sign(..., None)
says mostly the same without the verbosity and additional fn
.
re: private chains, yeah - it's not our fault, though. @keorn has a script to help with this. |
ChainEra::TransitionTest => ethereum::new_transition_test().engine, | ||
}; | ||
|
||
for (name, test) in tests.into_iter() { | ||
/* if name != "ZeroValue_SUICIDE" { | ||
continue; | ||
}*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
Components: