Browse Source

Cleanup

checkpoints rc1
Aditya Kulkarni 5 years ago
parent
commit
0db5423927
  1. 3
      src/lightclient.rs
  2. 23
      src/lightwallet.rs

3
src/lightclient.rs

@ -712,9 +712,6 @@ impl LightClient {
for (txid, height) in txids_to_fetch {
let light_wallet_clone = self.wallet.clone();
info!("Fetching full Tx: {}", txid);
if print_updates {
responses.push(format!("Fetching full Tx: {}", txid));
}
fetch_full_tx(&self.get_server_uri(), txid, self.config.no_cert_verification, move |tx_bytes: &[u8] | {
let tx = Transaction::read(tx_bytes).unwrap();

23
src/lightwallet.rs

@ -88,26 +88,6 @@ impl ToBase58Check for [u8] {
payload.to_base58()
}
}
//
//pub trait FromBase58Check {
// fn from_base58check(&self, version: &[u8], suffix: &[u8]) -> Vec<u8>;
//}
//
//
//impl FromBase58Check for str {
// fn from_base58check(&self, version: &[u8], suffix: &[u8]) -> Vec<u8> {
// let mut payload: Vec<u8> = Vec::new();
// let bytes = self.from_base58().unwrap();
//
// let start = version.len();
// let end = bytes.len() - (4 + suffix.len());
//
// payload.extend(&bytes[start..end]);
//
// payload
// }
//}
pub struct LightWallet {
seed: [u8; 32], // Seed phrase for this wallet.
@ -269,6 +249,9 @@ impl LightWallet {
// Write the seed
writer.write_all(&self.seed)?;
// Flush after writing the seed, so in case of a disaster, we can still recover the seed.
writer.flush()?;
// Write all the spending keys
Vector::write(&mut writer, &self.extsks.read().unwrap(),
|w, sk| sk.write(w)

Loading…
Cancel
Save