fix deadlock while adding new addresses
This commit is contained in:
@@ -827,9 +827,10 @@ impl LightClient {
|
|||||||
return Err("Wallet is locked".to_string());
|
return Err("Wallet is locked".to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let new_address = {
|
||||||
let wallet = self.wallet.write().unwrap();
|
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(),
|
||||||
_ => {
|
_ => {
|
||||||
@@ -837,6 +838,7 @@ impl LightClient {
|
|||||||
error!("{}", e);
|
error!("{}", e);
|
||||||
return Err(e);
|
return Err(e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
self.do_save()?;
|
self.do_save()?;
|
||||||
|
|||||||
Reference in New Issue
Block a user