mirror of
https://github.com/Qortal/piratewallet-light-cli.git
synced 2025-01-30 18:42:15 +00:00
remove support for taddresses
This commit is contained in:
parent
e19a1572e3
commit
de11448316
@ -385,8 +385,8 @@ impl LightWallet {
|
|||||||
nonce: nonce,
|
nonce: nonce,
|
||||||
seed: seed_bytes,
|
seed: seed_bytes,
|
||||||
zkeys: Arc::new(RwLock::new(zkeys)),
|
zkeys: Arc::new(RwLock::new(zkeys)),
|
||||||
tkeys: Arc::new(RwLock::new(tkeys)),
|
tkeys: Arc::new(RwLock::new(vec![])),
|
||||||
taddresses: Arc::new(RwLock::new(taddresses)),
|
taddresses: Arc::new(RwLock::new(vec![])),
|
||||||
blocks: Arc::new(RwLock::new(blocks)),
|
blocks: Arc::new(RwLock::new(blocks)),
|
||||||
txs: Arc::new(RwLock::new(txs)),
|
txs: Arc::new(RwLock::new(txs)),
|
||||||
mempool_txs: Arc::new(RwLock::new(HashMap::new())),
|
mempool_txs: Arc::new(RwLock::new(HashMap::new())),
|
||||||
@ -870,17 +870,17 @@ impl LightWallet {
|
|||||||
|
|
||||||
// Transparent keys
|
// Transparent keys
|
||||||
let mut tkeys = vec![];
|
let mut tkeys = vec![];
|
||||||
for pos in 0..self.taddresses.read().unwrap().len() {
|
// for pos in 0..self.taddresses.read().unwrap().len() {
|
||||||
let sk = LightWallet::get_taddr_from_bip39seed(&self.config, &bip39_seed.as_bytes(), pos as u32);
|
// let sk = LightWallet::get_taddr_from_bip39seed(&self.config, &bip39_seed.as_bytes(), pos as u32);
|
||||||
let address = self.address_from_sk(&sk);
|
// let address = self.address_from_sk(&sk);
|
||||||
|
//
|
||||||
if address != self.taddresses.read().unwrap()[pos] {
|
// if address != self.taddresses.read().unwrap()[pos] {
|
||||||
return Err(io::Error::new(ErrorKind::InvalidData,
|
// return Err(io::Error::new(ErrorKind::InvalidData,
|
||||||
format!("taddress mismatch at {}. {} vs {}", pos, address, self.taddresses.read().unwrap()[pos])));
|
// format!("taddress mismatch at {}. {} vs {}", pos, address, self.taddresses.read().unwrap()[pos])));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
tkeys.push(sk);
|
// tkeys.push(sk);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Go over the zkeys, and add the spending keys again
|
// Go over the zkeys, and add the spending keys again
|
||||||
self.zkeys.write().unwrap().iter_mut().map(|zk| {
|
self.zkeys.write().unwrap().iter_mut().map(|zk| {
|
||||||
@ -1158,7 +1158,7 @@ impl LightWallet {
|
|||||||
// If the wallet is locked, this is a no-op. That is fine, since we really
|
// If the wallet is locked, this is a no-op. That is fine, since we really
|
||||||
// need to only add new addresses when restoring a new wallet, when it will not be locked.
|
// need to only add new addresses when restoring a new wallet, when it will not be locked.
|
||||||
// Also, if it is locked, the user can't create new addresses anyway.
|
// Also, if it is locked, the user can't create new addresses anyway.
|
||||||
self.add_taddr();
|
// self.add_taddr();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ impl BugBip39Derivation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _ in 1..num_taddrs {
|
for _ in 1..num_taddrs {
|
||||||
wallet.add_taddr();
|
// wallet.add_taddr();
|
||||||
}
|
}
|
||||||
|
|
||||||
let r = object!{
|
let r = object!{
|
||||||
|
Loading…
Reference in New Issue
Block a user