mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-26 16:35:18 -04:00
improve stability on tor, refactor startup and shut down
refactor startup sequence to improve message reliability refactor shut down sequence to finish processing messages reduce monerod requests to improve slow tor connections refactor trade wallet polling monero node service uses default data directory unless local connections service checks connection by polling daemon connections service supports getRefreshPeriodMs and shutting down add make config: monerod-stagenet-custom fix bugs in key image polling force stop wallet on deletion trade manager initializes persisted trades on data received support hardcoding monero log level and request stack traces remove xmrAddress from Arbitrator model fix formatting of MoneroWalletRpcManager
This commit is contained in:
parent
5e364f7e7e
commit
2afa5d761d
51 changed files with 1058 additions and 644 deletions
|
@ -465,13 +465,21 @@ public abstract class DisputeManager<T extends DisputeList<Dispute>> extends Sup
|
|||
DisputeValidation.validateDisputeData(dispute);
|
||||
DisputeValidation.validateNodeAddresses(dispute, config);
|
||||
DisputeValidation.validateSenderNodeAddress(dispute, message.getSenderNodeAddress());
|
||||
DisputeValidation.validatePaymentAccountPayload(dispute);
|
||||
//DisputeValidation.testIfDisputeTriesReplay(dispute, disputeList.getList());
|
||||
} catch (DisputeValidation.ValidationException e) {
|
||||
validationExceptions.add(e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
// try to validate payment account
|
||||
// TODO: add field to dispute details: valid, invalid, missing
|
||||
try {
|
||||
DisputeValidation.validatePaymentAccountPayload(dispute);
|
||||
} catch (Exception e) {
|
||||
log.warn(e.getMessage());
|
||||
trade.prependErrorMessage(e.getMessage());
|
||||
}
|
||||
|
||||
// get sender
|
||||
senderPubKeyRing = trade.isArbitrator() ? (dispute.isDisputeOpenerIsBuyer() ? contract.getBuyerPubKeyRing() : contract.getSellerPubKeyRing()) : trade.getArbitrator().getPubKeyRing();
|
||||
TradePeer sender = trade.getTradePeer(senderPubKeyRing);
|
||||
|
|
|
@ -37,10 +37,8 @@ import java.util.Optional;
|
|||
@Slf4j
|
||||
@Getter
|
||||
public final class Arbitrator extends DisputeAgent {
|
||||
private final String xmrAddress;
|
||||
|
||||
public Arbitrator(NodeAddress nodeAddress,
|
||||
String xmrAddress,
|
||||
PubKeyRing pubKeyRing,
|
||||
List<String> languageCodes,
|
||||
long registrationDate,
|
||||
|
@ -59,8 +57,6 @@ public final class Arbitrator extends DisputeAgent {
|
|||
emailAddress,
|
||||
info,
|
||||
extraDataMap);
|
||||
|
||||
this.xmrAddress = xmrAddress;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -71,7 +67,6 @@ public final class Arbitrator extends DisputeAgent {
|
|||
public protobuf.StoragePayload toProtoMessage() {
|
||||
protobuf.Arbitrator.Builder builder = protobuf.Arbitrator.newBuilder()
|
||||
.setNodeAddress(nodeAddress.toProtoMessage())
|
||||
.setXmrAddress(xmrAddress)
|
||||
.setPubKeyRing(pubKeyRing.toProtoMessage())
|
||||
.addAllLanguageCodes(languageCodes)
|
||||
.setRegistrationDate(registrationDate)
|
||||
|
@ -85,7 +80,6 @@ public final class Arbitrator extends DisputeAgent {
|
|||
|
||||
public static Arbitrator fromProto(protobuf.Arbitrator proto) {
|
||||
return new Arbitrator(NodeAddress.fromProto(proto.getNodeAddress()),
|
||||
proto.getXmrAddress(),
|
||||
PubKeyRing.fromProto(proto.getPubKeyRing()),
|
||||
new ArrayList<>(proto.getLanguageCodesList()),
|
||||
proto.getRegistrationDate(),
|
||||
|
@ -103,8 +97,6 @@ public final class Arbitrator extends DisputeAgent {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Arbitrator{" +
|
||||
",\n xmrAddress='" + xmrAddress + '\'' +
|
||||
"\n} " + super.toString();
|
||||
return "Arbitrator{} " + super.toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue