pub fn sign(&self, private_key: &H256) -> Vec<u8> {
        let hash = self.hash();
        let sig = ecdsa_sign(hash, &private_key, self.chain_id);
        let mut tx = RlpStream::new();
        tx.begin_unbounded_list();
        self.encode(&mut tx);
        tx.append(&sig.v);
        let r_start = find_first_nonzero(&sig.r);
        let r = &sig.r[r_start..];
        tx.append(&r);
        let s_start = find_first_nonzero(&sig.s);
        let s = &sig.s[s_start..];
        tx.append(&s);
        tx.finalize_unbounded_list();
        tx.out()
    }
/// Signs and returns the RLP-encoded transaction
Signs and returns the RLP-encoded transaction
Signs and returns the RLP - encoded transaction
pub fn sign(&self, private_key: &H256) -> Vec<u8> {
        let hash = self.hash();
        let sig = ecdsa_sign(hash, &private_key, self.chain_id);
        let mut tx = RlpStream::new();
        tx.begin_unbounded_list();
        self.encode(&mut tx);
        tx.append(&sig.v);
        let r_start = find_first_nonzero(&sig.r);
        let r = &sig.r[r_start..];
        tx.append(&r);
        let s_start = find_first_nonzero(&sig.s);
        let s = &sig.s[s_start..];
        tx.append(&s);
        tx.finalize_unbounded_list();
        tx.out()
    }
pub fn sign ( & self , private_key : & H256 ) -> Vec < u8 > { let hash = self . hash ( ) ; let sig = ecdsa_sign ( hash , & private_key , self . chain_id ) ; let mut tx = RlpStream :: new ( ) ; tx . begin_unbounded_list ( ) ; self . encode ( & mut tx ) ; tx . append ( & sig . v ) ; let r_start = find_first_nonzero ( & sig . r ) ; let r = & sig . r [ r_start .. ] ; tx . append ( & r ) ; let s_start = find_first_nonzero ( & sig . s ) ; let s = & sig . s [ s_start .. ] ; tx . append ( & s ) ; tx . finalize_unbounded_list ( ) ; tx . out ( ) }
Signs and returns the RLP-encoded transaction
Signs and returns the RLP - encoded transaction
&self
private_key
&H256