mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-22 19:49:32 +00:00
synchronize on wallet while importing multisig hex
This commit is contained in:
parent
2b41e82b86
commit
0bc5300a27
1 changed files with 10 additions and 8 deletions
|
@ -788,14 +788,16 @@ public abstract class Trade implements Tradable, Model {
|
|||
}
|
||||
|
||||
public void importMultisigHex() {
|
||||
List<String> multisigHexes = new ArrayList<String>();
|
||||
if (getBuyer().getUpdatedMultisigHex() != null) multisigHexes.add(getBuyer().getUpdatedMultisigHex());
|
||||
if (getSeller().getUpdatedMultisigHex() != null) multisigHexes.add(getSeller().getUpdatedMultisigHex());
|
||||
if (getArbitrator().getUpdatedMultisigHex() != null) multisigHexes.add(getArbitrator().getUpdatedMultisigHex());
|
||||
if (!multisigHexes.isEmpty()) {
|
||||
log.info("Importing multisig hex for {} {}", getClass().getSimpleName(), getId());
|
||||
getWallet().importMultisigHex(multisigHexes.toArray(new String[0]));
|
||||
log.info("Done importing multisig hex for {} {}", getClass().getSimpleName(), getId());
|
||||
synchronized (walletLock) {
|
||||
List<String> multisigHexes = new ArrayList<String>();
|
||||
if (getBuyer().getUpdatedMultisigHex() != null) multisigHexes.add(getBuyer().getUpdatedMultisigHex());
|
||||
if (getSeller().getUpdatedMultisigHex() != null) multisigHexes.add(getSeller().getUpdatedMultisigHex());
|
||||
if (getArbitrator().getUpdatedMultisigHex() != null) multisigHexes.add(getArbitrator().getUpdatedMultisigHex());
|
||||
if (!multisigHexes.isEmpty()) {
|
||||
log.info("Importing multisig hex for {} {}", getClass().getSimpleName(), getId());
|
||||
getWallet().importMultisigHex(multisigHexes.toArray(new String[0]));
|
||||
log.info("Done importing multisig hex for {} {}", getClass().getSimpleName(), getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue