diff --git a/core/src/main/java/bisq/core/btc/wallet/XmrWalletService.java b/core/src/main/java/bisq/core/btc/wallet/XmrWalletService.java index edf5d902..f3c60144 100644 --- a/core/src/main/java/bisq/core/btc/wallet/XmrWalletService.java +++ b/core/src/main/java/bisq/core/btc/wallet/XmrWalletService.java @@ -280,9 +280,11 @@ public class XmrWalletService { public MoneroTxWallet createTx(List destinations) { try { - MoneroTxWallet tx = wallet.createTx(new MoneroTxConfig().setAccountIndex(0).setDestinations(destinations).setRelay(false).setCanSplit(false)); - //printTxs("XmrWalletService.createTx", tx); - return tx; + synchronized (wallet) { + MoneroTxWallet tx = wallet.createTx(new MoneroTxConfig().setAccountIndex(0).setDestinations(destinations).setRelay(false).setCanSplit(false)); + //printTxs("XmrWalletService.createTx", tx); + return tx; + } } catch (Exception e) { throw e; } diff --git a/core/src/main/java/bisq/core/support/dispute/DisputeManager.java b/core/src/main/java/bisq/core/support/dispute/DisputeManager.java index 73ce8184..6bf9f738 100644 --- a/core/src/main/java/bisq/core/support/dispute/DisputeManager.java +++ b/core/src/main/java/bisq/core/support/dispute/DisputeManager.java @@ -715,6 +715,10 @@ public abstract class DisputeManager> extends Sup return; } + // sync and save wallet + trade.syncWallet(); + trade.saveWallet(); + // create unsigned dispute payout tx if not already published and arbitrator has trader's updated multisig info TradingPeer receiver = trade.getTradingPeer(dispute.getTraderPubKeyRing()); if (!trade.isPayoutPublished() && receiver.getUpdatedMultisigHex() != null) { @@ -726,10 +730,12 @@ public abstract class DisputeManager> extends Sup if (trade.getSeller().getUpdatedMultisigHex() != null) updatedMultisigHexes.add(trade.getSeller().getUpdatedMultisigHex()); if (!updatedMultisigHexes.isEmpty()) { multisigWallet.importMultisigHex(updatedMultisigHexes.toArray(new String[0])); // TODO (monero-project): fails if multisig hex imported individually - trade.syncWallet(); - trade.saveWallet(); } + // sync and save wallet + trade.syncWallet(); + trade.saveWallet(); + // create unsigned dispute payout tx if (!trade.isPayoutPublished()) { log.info("Arbitrator creating unsigned dispute payout tx for trade {}", trade.getId()); diff --git a/core/src/main/java/bisq/core/trade/protocol/TradingPeer.java b/core/src/main/java/bisq/core/trade/protocol/TradingPeer.java index 1ece9cc2..8ed04894 100644 --- a/core/src/main/java/bisq/core/trade/protocol/TradingPeer.java +++ b/core/src/main/java/bisq/core/trade/protocol/TradingPeer.java @@ -135,8 +135,7 @@ public final class TradingPeer implements PersistablePayload { @Override public Message toProtoMessage() { final protobuf.TradingPeer.Builder builder = protobuf.TradingPeer.newBuilder() - .setChangeOutputValue(changeOutputValue) - .addAllReserveTxKeyImages(reserveTxKeyImages); + .setChangeOutputValue(changeOutputValue); Optional.ofNullable(nodeAddress).ifPresent(e -> builder.setNodeAddress(nodeAddress.toProtoMessage())); Optional.ofNullable(pubKeyRing).ifPresent(e -> builder.setPubKeyRing(pubKeyRing.toProtoMessage())); Optional.ofNullable(accountId).ifPresent(builder::setAccountId); @@ -160,6 +159,7 @@ public final class TradingPeer implements PersistablePayload { Optional.ofNullable(reserveTxHash).ifPresent(e -> builder.setReserveTxHash(reserveTxHash)); Optional.ofNullable(reserveTxHex).ifPresent(e -> builder.setReserveTxHex(reserveTxHex)); Optional.ofNullable(reserveTxKey).ifPresent(e -> builder.setReserveTxKey(reserveTxKey)); + Optional.ofNullable(reserveTxKeyImages).ifPresent(e -> builder.addAllReserveTxKeyImages(reserveTxKeyImages)); Optional.ofNullable(preparedMultisigHex).ifPresent(e -> builder.setPreparedMultisigHex(preparedMultisigHex)); Optional.ofNullable(madeMultisigHex).ifPresent(e -> builder.setMadeMultisigHex(madeMultisigHex)); Optional.ofNullable(exchangedMultisigHex).ifPresent(e -> builder.setExchangedMultisigHex(exchangedMultisigHex)); diff --git a/daemon/src/main/java/bisq/daemon/grpc/GrpcDisputesService.java b/daemon/src/main/java/bisq/daemon/grpc/GrpcDisputesService.java index bca73e03..eaa7f1fd 100644 --- a/daemon/src/main/java/bisq/daemon/grpc/GrpcDisputesService.java +++ b/daemon/src/main/java/bisq/daemon/grpc/GrpcDisputesService.java @@ -145,7 +145,7 @@ public class GrpcDisputesService extends DisputesImplBase { return getCustomRateMeteringInterceptor(coreApi.getConfig().appDataDir, this.getClass()) .or(() -> Optional.of(CallRateMeteringInterceptor.valueOf( new HashMap<>() {{ - put(getGetDisputeMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS)); + put(getGetDisputeMethod().getFullMethodName(), new GrpcCallRateMeter(20, SECONDS)); put(getGetDisputesMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS)); put(getResolveDisputeMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS)); put(getOpenDisputeMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS));