Generalize Transaction::new to accept anything that implements KeypairUtil

This commit is contained in:
Greg Fitzgerald
2019-01-29 16:57:48 -07:00
parent 34c8b2cc2f
commit c741a960b9
8 changed files with 26 additions and 25 deletions

View File

@@ -112,7 +112,7 @@ impl ThinClient {
tries: usize,
) -> io::Result<Signature> {
for x in 0..tries {
tx.sign(&[&keypair], self.get_last_id());
tx.sign(&[keypair], self.get_last_id());
let mut buf = vec![0; tx.serialized_size().unwrap() as usize];
let mut wr = std::io::Cursor::new(&mut buf[..]);
serialize_into(&mut wr, &tx).expect("serialize Transaction in pub fn transfer_signed");