synchronize on wallet while importing multisig hex

This commit is contained in:
woodser 2023-11-15 12:17:25 -05:00
parent 2b41e82b86
commit 0bc5300a27

View file

@ -788,6 +788,7 @@ public abstract class Trade implements Tradable, Model {
} }
public void importMultisigHex() { public void importMultisigHex() {
synchronized (walletLock) {
List<String> multisigHexes = new ArrayList<String>(); List<String> multisigHexes = new ArrayList<String>();
if (getBuyer().getUpdatedMultisigHex() != null) multisigHexes.add(getBuyer().getUpdatedMultisigHex()); if (getBuyer().getUpdatedMultisigHex() != null) multisigHexes.add(getBuyer().getUpdatedMultisigHex());
if (getSeller().getUpdatedMultisigHex() != null) multisigHexes.add(getSeller().getUpdatedMultisigHex()); if (getSeller().getUpdatedMultisigHex() != null) multisigHexes.add(getSeller().getUpdatedMultisigHex());
@ -798,6 +799,7 @@ public abstract class Trade implements Tradable, Model {
log.info("Done importing multisig hex for {} {}", getClass().getSimpleName(), getId()); log.info("Done importing multisig hex for {} {}", getClass().getSimpleName(), getId());
} }
} }
}
public void changeWalletPassword(String oldPassword, String newPassword) { public void changeWalletPassword(String oldPassword, String newPassword) {
synchronized (walletLock) { synchronized (walletLock) {