null_sign with network id
This commit is contained in:
		
							parent
							
								
									04e581db61
								
							
						
					
					
						commit
						97052f3912
					
				@ -127,7 +127,7 @@ impl From<ethjson::state::Transaction> for SignedTransaction {
 | 
				
			|||||||
		};
 | 
							};
 | 
				
			||||||
		match secret {
 | 
							match secret {
 | 
				
			||||||
			Some(s) => tx.sign(&s, None),
 | 
								Some(s) => tx.sign(&s, None),
 | 
				
			||||||
			None => tx.null_sign(),
 | 
								None => tx.null_sign(1),
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -210,13 +210,13 @@ impl Transaction {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/// Add EIP-86 compatible empty signature.
 | 
						/// Add EIP-86 compatible empty signature.
 | 
				
			||||||
	pub fn null_sign(self) -> SignedTransaction {
 | 
						pub fn null_sign(self, network_id: u64) -> SignedTransaction {
 | 
				
			||||||
		SignedTransaction {
 | 
							SignedTransaction {
 | 
				
			||||||
			transaction: UnverifiedTransaction {
 | 
								transaction: UnverifiedTransaction {
 | 
				
			||||||
				unsigned: self,
 | 
									unsigned: self,
 | 
				
			||||||
				r: U256::zero(),
 | 
									r: U256::zero(),
 | 
				
			||||||
				s: U256::zero(),
 | 
									s: U256::zero(),
 | 
				
			||||||
				v: 0,
 | 
									v: network_id,
 | 
				
			||||||
				hash: 0.into(),
 | 
									hash: 0.into(),
 | 
				
			||||||
			}.compute_hash(),
 | 
								}.compute_hash(),
 | 
				
			||||||
			sender: UNSIGNED_SENDER,
 | 
								sender: UNSIGNED_SENDER,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user