mirror of
https://github.com/Qortal/piratewallet-light-cli.git
synced 2025-02-14 19:05:48 +00:00
fix deadlock while adding new addresses
This commit is contained in:
parent
5d38585251
commit
a0da414bca
@ -827,15 +827,17 @@ impl LightClient {
|
|||||||
return Err("Wallet is locked".to_string());
|
return Err("Wallet is locked".to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
let wallet = self.wallet.write().unwrap();
|
let new_address = {
|
||||||
|
let wallet = self.wallet.write().unwrap();
|
||||||
|
|
||||||
let new_address = match addr_type {
|
match addr_type {
|
||||||
"z" => wallet.add_zaddr(),
|
"z" => wallet.add_zaddr(),
|
||||||
"t" => wallet.add_taddr(),
|
"t" => wallet.add_taddr(),
|
||||||
_ => {
|
_ => {
|
||||||
let e = format!("Unrecognized address type: {}", addr_type);
|
let e = format!("Unrecognized address type: {}", addr_type);
|
||||||
error!("{}", e);
|
error!("{}", e);
|
||||||
return Err(e);
|
return Err(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user