Fix up the transaction JSON serialisation for RPC.

This commit is contained in:
Gav Wood
2016-11-27 14:11:37 +01:00
parent a7037f8e5b
commit 3b6d886860
2 changed files with 19 additions and 6 deletions

View File

@@ -304,6 +304,9 @@ impl SignedTransaction {
/// 0 if `v` would have been 27 under "Electrum" notation, 1 if 28 or 4 if invalid.
pub fn standard_v(&self) -> u8 { match self.v { v if v == 27 || v == 28 || v > 36 => (v - 1) % 2, _ => 4 } }
/// The `v` value that appears in the RLP.
pub fn original_v(&self) -> u8 { self.v }
/// The network ID, or `None` if this is a global transaction.
pub fn network_id(&self) -> Option<u8> {
match self.v {