mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-08-03 03:56:08 -04:00
test monerod3 with proper connection
This commit is contained in:
parent
da79f15a5a
commit
24f6ce227a
4 changed files with 178 additions and 102 deletions
8
dist/protobuf/pb_pb.d.ts
vendored
8
dist/protobuf/pb_pb.d.ts
vendored
|
@ -6349,6 +6349,9 @@ export class ProcessModel extends jspb.Message {
|
||||||
getPaymentSentMessageState(): string;
|
getPaymentSentMessageState(): string;
|
||||||
setPaymentSentMessageState(value: string): ProcessModel;
|
setPaymentSentMessageState(value: string): ProcessModel;
|
||||||
|
|
||||||
|
getPaymentSentMessageStateArbitrator(): string;
|
||||||
|
setPaymentSentMessageStateArbitrator(value: string): ProcessModel;
|
||||||
|
|
||||||
getMakerSignature(): Uint8Array | string;
|
getMakerSignature(): Uint8Array | string;
|
||||||
getMakerSignature_asU8(): Uint8Array;
|
getMakerSignature_asU8(): Uint8Array;
|
||||||
getMakerSignature_asB64(): string;
|
getMakerSignature_asB64(): string;
|
||||||
|
@ -6388,6 +6391,9 @@ export class ProcessModel extends jspb.Message {
|
||||||
getSellerPayoutAmountFromMediation(): number;
|
getSellerPayoutAmountFromMediation(): number;
|
||||||
setSellerPayoutAmountFromMediation(value: number): ProcessModel;
|
setSellerPayoutAmountFromMediation(value: number): ProcessModel;
|
||||||
|
|
||||||
|
getDeleteBackupsHeight(): number;
|
||||||
|
setDeleteBackupsHeight(value: number): ProcessModel;
|
||||||
|
|
||||||
serializeBinary(): Uint8Array;
|
serializeBinary(): Uint8Array;
|
||||||
toObject(includeInstance?: boolean): ProcessModel.AsObject;
|
toObject(includeInstance?: boolean): ProcessModel.AsObject;
|
||||||
static toObject(includeInstance: boolean, msg: ProcessModel): ProcessModel.AsObject;
|
static toObject(includeInstance: boolean, msg: ProcessModel): ProcessModel.AsObject;
|
||||||
|
@ -6405,6 +6411,7 @@ export namespace ProcessModel {
|
||||||
useSavingsWallet: boolean,
|
useSavingsWallet: boolean,
|
||||||
fundsNeededForTrade: number,
|
fundsNeededForTrade: number,
|
||||||
paymentSentMessageState: string,
|
paymentSentMessageState: string,
|
||||||
|
paymentSentMessageStateArbitrator: string,
|
||||||
makerSignature: Uint8Array | string,
|
makerSignature: Uint8Array | string,
|
||||||
maker?: TradePeer.AsObject,
|
maker?: TradePeer.AsObject,
|
||||||
taker?: TradePeer.AsObject,
|
taker?: TradePeer.AsObject,
|
||||||
|
@ -6414,6 +6421,7 @@ export namespace ProcessModel {
|
||||||
mediatedPayoutTxSignature: Uint8Array | string,
|
mediatedPayoutTxSignature: Uint8Array | string,
|
||||||
buyerPayoutAmountFromMediation: number,
|
buyerPayoutAmountFromMediation: number,
|
||||||
sellerPayoutAmountFromMediation: number,
|
sellerPayoutAmountFromMediation: number,
|
||||||
|
deleteBackupsHeight: number,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
190
dist/protobuf/pb_pb.js
vendored
190
dist/protobuf/pb_pb.js
vendored
|
@ -51192,15 +51192,17 @@ proto.io.haveno.protobuffer.ProcessModel.toObject = function(includeInstance, ms
|
||||||
useSavingsWallet: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
|
useSavingsWallet: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
|
||||||
fundsNeededForTrade: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
fundsNeededForTrade: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
||||||
paymentSentMessageState: jspb.Message.getFieldWithDefault(msg, 7, ""),
|
paymentSentMessageState: jspb.Message.getFieldWithDefault(msg, 7, ""),
|
||||||
|
paymentSentMessageStateArbitrator: jspb.Message.getFieldWithDefault(msg, 8, ""),
|
||||||
makerSignature: msg.getMakerSignature_asB64(),
|
makerSignature: msg.getMakerSignature_asB64(),
|
||||||
maker: (f = msg.getMaker()) && proto.io.haveno.protobuffer.TradePeer.toObject(includeInstance, f),
|
maker: (f = msg.getMaker()) && proto.io.haveno.protobuffer.TradePeer.toObject(includeInstance, f),
|
||||||
taker: (f = msg.getTaker()) && proto.io.haveno.protobuffer.TradePeer.toObject(includeInstance, f),
|
taker: (f = msg.getTaker()) && proto.io.haveno.protobuffer.TradePeer.toObject(includeInstance, f),
|
||||||
arbitrator: (f = msg.getArbitrator()) && proto.io.haveno.protobuffer.TradePeer.toObject(includeInstance, f),
|
arbitrator: (f = msg.getArbitrator()) && proto.io.haveno.protobuffer.TradePeer.toObject(includeInstance, f),
|
||||||
tempTradePeerNodeAddress: (f = msg.getTempTradePeerNodeAddress()) && proto.io.haveno.protobuffer.NodeAddress.toObject(includeInstance, f),
|
tempTradePeerNodeAddress: (f = msg.getTempTradePeerNodeAddress()) && proto.io.haveno.protobuffer.NodeAddress.toObject(includeInstance, f),
|
||||||
multisigAddress: jspb.Message.getFieldWithDefault(msg, 13, ""),
|
multisigAddress: jspb.Message.getFieldWithDefault(msg, 14, ""),
|
||||||
mediatedPayoutTxSignature: msg.getMediatedPayoutTxSignature_asB64(),
|
mediatedPayoutTxSignature: msg.getMediatedPayoutTxSignature_asB64(),
|
||||||
buyerPayoutAmountFromMediation: jspb.Message.getFieldWithDefault(msg, 18, 0),
|
buyerPayoutAmountFromMediation: jspb.Message.getFieldWithDefault(msg, 16, 0),
|
||||||
sellerPayoutAmountFromMediation: jspb.Message.getFieldWithDefault(msg, 19, 0)
|
sellerPayoutAmountFromMediation: jspb.Message.getFieldWithDefault(msg, 17, 0),
|
||||||
|
deleteBackupsHeight: jspb.Message.getFieldWithDefault(msg, 18, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (includeInstance) {
|
if (includeInstance) {
|
||||||
|
@ -51267,45 +51269,53 @@ proto.io.haveno.protobuffer.ProcessModel.deserializeBinaryFromReader = function(
|
||||||
msg.setPaymentSentMessageState(value);
|
msg.setPaymentSentMessageState(value);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
var value = /** @type {string} */ (reader.readString());
|
||||||
msg.setMakerSignature(value);
|
msg.setPaymentSentMessageStateArbitrator(value);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
var value = new proto.io.haveno.protobuffer.TradePeer;
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
||||||
reader.readMessage(value,proto.io.haveno.protobuffer.TradePeer.deserializeBinaryFromReader);
|
msg.setMakerSignature(value);
|
||||||
msg.setMaker(value);
|
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
var value = new proto.io.haveno.protobuffer.TradePeer;
|
var value = new proto.io.haveno.protobuffer.TradePeer;
|
||||||
reader.readMessage(value,proto.io.haveno.protobuffer.TradePeer.deserializeBinaryFromReader);
|
reader.readMessage(value,proto.io.haveno.protobuffer.TradePeer.deserializeBinaryFromReader);
|
||||||
msg.setTaker(value);
|
msg.setMaker(value);
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
var value = new proto.io.haveno.protobuffer.TradePeer;
|
var value = new proto.io.haveno.protobuffer.TradePeer;
|
||||||
reader.readMessage(value,proto.io.haveno.protobuffer.TradePeer.deserializeBinaryFromReader);
|
reader.readMessage(value,proto.io.haveno.protobuffer.TradePeer.deserializeBinaryFromReader);
|
||||||
msg.setArbitrator(value);
|
msg.setTaker(value);
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
|
var value = new proto.io.haveno.protobuffer.TradePeer;
|
||||||
|
reader.readMessage(value,proto.io.haveno.protobuffer.TradePeer.deserializeBinaryFromReader);
|
||||||
|
msg.setArbitrator(value);
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
var value = new proto.io.haveno.protobuffer.NodeAddress;
|
var value = new proto.io.haveno.protobuffer.NodeAddress;
|
||||||
reader.readMessage(value,proto.io.haveno.protobuffer.NodeAddress.deserializeBinaryFromReader);
|
reader.readMessage(value,proto.io.haveno.protobuffer.NodeAddress.deserializeBinaryFromReader);
|
||||||
msg.setTempTradePeerNodeAddress(value);
|
msg.setTempTradePeerNodeAddress(value);
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 14:
|
||||||
var value = /** @type {string} */ (reader.readString());
|
var value = /** @type {string} */ (reader.readString());
|
||||||
msg.setMultisigAddress(value);
|
msg.setMultisigAddress(value);
|
||||||
break;
|
break;
|
||||||
case 17:
|
case 15:
|
||||||
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
||||||
msg.setMediatedPayoutTxSignature(value);
|
msg.setMediatedPayoutTxSignature(value);
|
||||||
break;
|
break;
|
||||||
case 18:
|
case 16:
|
||||||
var value = /** @type {number} */ (reader.readInt64());
|
var value = /** @type {number} */ (reader.readInt64());
|
||||||
msg.setBuyerPayoutAmountFromMediation(value);
|
msg.setBuyerPayoutAmountFromMediation(value);
|
||||||
break;
|
break;
|
||||||
case 19:
|
case 17:
|
||||||
var value = /** @type {number} */ (reader.readInt64());
|
var value = /** @type {number} */ (reader.readInt64());
|
||||||
msg.setSellerPayoutAmountFromMediation(value);
|
msg.setSellerPayoutAmountFromMediation(value);
|
||||||
break;
|
break;
|
||||||
|
case 18:
|
||||||
|
var value = /** @type {number} */ (reader.readInt64());
|
||||||
|
msg.setDeleteBackupsHeight(value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
reader.skipField();
|
reader.skipField();
|
||||||
break;
|
break;
|
||||||
|
@ -51385,22 +51395,21 @@ proto.io.haveno.protobuffer.ProcessModel.serializeBinaryToWriter = function(mess
|
||||||
f
|
f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
f = message.getMakerSignature_asU8();
|
f = message.getPaymentSentMessageStateArbitrator();
|
||||||
if (f.length > 0) {
|
if (f.length > 0) {
|
||||||
writer.writeBytes(
|
writer.writeString(
|
||||||
8,
|
8,
|
||||||
f
|
f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
f = message.getMaker();
|
f = message.getMakerSignature_asU8();
|
||||||
if (f != null) {
|
if (f.length > 0) {
|
||||||
writer.writeMessage(
|
writer.writeBytes(
|
||||||
9,
|
9,
|
||||||
f,
|
f
|
||||||
proto.io.haveno.protobuffer.TradePeer.serializeBinaryToWriter
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
f = message.getTaker();
|
f = message.getMaker();
|
||||||
if (f != null) {
|
if (f != null) {
|
||||||
writer.writeMessage(
|
writer.writeMessage(
|
||||||
10,
|
10,
|
||||||
|
@ -51408,7 +51417,7 @@ proto.io.haveno.protobuffer.ProcessModel.serializeBinaryToWriter = function(mess
|
||||||
proto.io.haveno.protobuffer.TradePeer.serializeBinaryToWriter
|
proto.io.haveno.protobuffer.TradePeer.serializeBinaryToWriter
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
f = message.getArbitrator();
|
f = message.getTaker();
|
||||||
if (f != null) {
|
if (f != null) {
|
||||||
writer.writeMessage(
|
writer.writeMessage(
|
||||||
11,
|
11,
|
||||||
|
@ -51416,39 +51425,54 @@ proto.io.haveno.protobuffer.ProcessModel.serializeBinaryToWriter = function(mess
|
||||||
proto.io.haveno.protobuffer.TradePeer.serializeBinaryToWriter
|
proto.io.haveno.protobuffer.TradePeer.serializeBinaryToWriter
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
f = message.getTempTradePeerNodeAddress();
|
f = message.getArbitrator();
|
||||||
if (f != null) {
|
if (f != null) {
|
||||||
writer.writeMessage(
|
writer.writeMessage(
|
||||||
12,
|
12,
|
||||||
f,
|
f,
|
||||||
|
proto.io.haveno.protobuffer.TradePeer.serializeBinaryToWriter
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getTempTradePeerNodeAddress();
|
||||||
|
if (f != null) {
|
||||||
|
writer.writeMessage(
|
||||||
|
13,
|
||||||
|
f,
|
||||||
proto.io.haveno.protobuffer.NodeAddress.serializeBinaryToWriter
|
proto.io.haveno.protobuffer.NodeAddress.serializeBinaryToWriter
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
f = message.getMultisigAddress();
|
f = message.getMultisigAddress();
|
||||||
if (f.length > 0) {
|
if (f.length > 0) {
|
||||||
writer.writeString(
|
writer.writeString(
|
||||||
13,
|
14,
|
||||||
f
|
f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
f = message.getMediatedPayoutTxSignature_asU8();
|
f = message.getMediatedPayoutTxSignature_asU8();
|
||||||
if (f.length > 0) {
|
if (f.length > 0) {
|
||||||
writer.writeBytes(
|
writer.writeBytes(
|
||||||
17,
|
15,
|
||||||
f
|
f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
f = message.getBuyerPayoutAmountFromMediation();
|
f = message.getBuyerPayoutAmountFromMediation();
|
||||||
if (f !== 0) {
|
if (f !== 0) {
|
||||||
writer.writeInt64(
|
writer.writeInt64(
|
||||||
18,
|
16,
|
||||||
f
|
f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
f = message.getSellerPayoutAmountFromMediation();
|
f = message.getSellerPayoutAmountFromMediation();
|
||||||
if (f !== 0) {
|
if (f !== 0) {
|
||||||
writer.writeInt64(
|
writer.writeInt64(
|
||||||
19,
|
17,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getDeleteBackupsHeight();
|
||||||
|
if (f !== 0) {
|
||||||
|
writer.writeInt64(
|
||||||
|
18,
|
||||||
f
|
f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -51625,16 +51649,34 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.setPaymentSentMessageState =
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional bytes maker_signature = 8;
|
* optional string payment_sent_message_state_arbitrator = 8;
|
||||||
* @return {!(string|Uint8Array)}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.getMakerSignature = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.getPaymentSentMessageStateArbitrator = function() {
|
||||||
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional bytes maker_signature = 8;
|
* @param {string} value
|
||||||
|
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.ProcessModel.prototype.setPaymentSentMessageStateArbitrator = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 8, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bytes maker_signature = 9;
|
||||||
|
* @return {!(string|Uint8Array)}
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.ProcessModel.prototype.getMakerSignature = function() {
|
||||||
|
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bytes maker_signature = 9;
|
||||||
* This is a type-conversion wrapper around `getMakerSignature()`
|
* This is a type-conversion wrapper around `getMakerSignature()`
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
|
@ -51645,7 +51687,7 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.getMakerSignature_asB64 = fun
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional bytes maker_signature = 8;
|
* optional bytes maker_signature = 9;
|
||||||
* Note that Uint8Array is not supported on all browsers.
|
* Note that Uint8Array is not supported on all browsers.
|
||||||
* @see http://caniuse.com/Uint8Array
|
* @see http://caniuse.com/Uint8Array
|
||||||
* This is a type-conversion wrapper around `getMakerSignature()`
|
* This is a type-conversion wrapper around `getMakerSignature()`
|
||||||
|
@ -51662,17 +51704,17 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.getMakerSignature_asU8 = func
|
||||||
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.setMakerSignature = function(value) {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.setMakerSignature = function(value) {
|
||||||
return jspb.Message.setProto3BytesField(this, 8, value);
|
return jspb.Message.setProto3BytesField(this, 9, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional TradePeer maker = 9;
|
* optional TradePeer maker = 10;
|
||||||
* @return {?proto.io.haveno.protobuffer.TradePeer}
|
* @return {?proto.io.haveno.protobuffer.TradePeer}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.getMaker = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.getMaker = function() {
|
||||||
return /** @type{?proto.io.haveno.protobuffer.TradePeer} */ (
|
return /** @type{?proto.io.haveno.protobuffer.TradePeer} */ (
|
||||||
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.TradePeer, 9));
|
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.TradePeer, 10));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -51681,7 +51723,7 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.getMaker = function() {
|
||||||
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.setMaker = function(value) {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.setMaker = function(value) {
|
||||||
return jspb.Message.setWrapperField(this, 9, value);
|
return jspb.Message.setWrapperField(this, 10, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -51699,17 +51741,17 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.clearMaker = function() {
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.hasMaker = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.hasMaker = function() {
|
||||||
return jspb.Message.getField(this, 9) != null;
|
return jspb.Message.getField(this, 10) != null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional TradePeer taker = 10;
|
* optional TradePeer taker = 11;
|
||||||
* @return {?proto.io.haveno.protobuffer.TradePeer}
|
* @return {?proto.io.haveno.protobuffer.TradePeer}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.getTaker = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.getTaker = function() {
|
||||||
return /** @type{?proto.io.haveno.protobuffer.TradePeer} */ (
|
return /** @type{?proto.io.haveno.protobuffer.TradePeer} */ (
|
||||||
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.TradePeer, 10));
|
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.TradePeer, 11));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -51718,7 +51760,7 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.getTaker = function() {
|
||||||
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.setTaker = function(value) {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.setTaker = function(value) {
|
||||||
return jspb.Message.setWrapperField(this, 10, value);
|
return jspb.Message.setWrapperField(this, 11, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -51736,17 +51778,17 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.clearTaker = function() {
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.hasTaker = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.hasTaker = function() {
|
||||||
return jspb.Message.getField(this, 10) != null;
|
return jspb.Message.getField(this, 11) != null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional TradePeer arbitrator = 11;
|
* optional TradePeer arbitrator = 12;
|
||||||
* @return {?proto.io.haveno.protobuffer.TradePeer}
|
* @return {?proto.io.haveno.protobuffer.TradePeer}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.getArbitrator = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.getArbitrator = function() {
|
||||||
return /** @type{?proto.io.haveno.protobuffer.TradePeer} */ (
|
return /** @type{?proto.io.haveno.protobuffer.TradePeer} */ (
|
||||||
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.TradePeer, 11));
|
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.TradePeer, 12));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -51755,7 +51797,7 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.getArbitrator = function() {
|
||||||
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.setArbitrator = function(value) {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.setArbitrator = function(value) {
|
||||||
return jspb.Message.setWrapperField(this, 11, value);
|
return jspb.Message.setWrapperField(this, 12, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -51773,17 +51815,17 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.clearArbitrator = function()
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.hasArbitrator = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.hasArbitrator = function() {
|
||||||
return jspb.Message.getField(this, 11) != null;
|
return jspb.Message.getField(this, 12) != null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional NodeAddress temp_trade_peer_node_address = 12;
|
* optional NodeAddress temp_trade_peer_node_address = 13;
|
||||||
* @return {?proto.io.haveno.protobuffer.NodeAddress}
|
* @return {?proto.io.haveno.protobuffer.NodeAddress}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.getTempTradePeerNodeAddress = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.getTempTradePeerNodeAddress = function() {
|
||||||
return /** @type{?proto.io.haveno.protobuffer.NodeAddress} */ (
|
return /** @type{?proto.io.haveno.protobuffer.NodeAddress} */ (
|
||||||
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.NodeAddress, 12));
|
jspb.Message.getWrapperField(this, proto.io.haveno.protobuffer.NodeAddress, 13));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -51792,7 +51834,7 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.getTempTradePeerNodeAddress =
|
||||||
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.setTempTradePeerNodeAddress = function(value) {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.setTempTradePeerNodeAddress = function(value) {
|
||||||
return jspb.Message.setWrapperField(this, 12, value);
|
return jspb.Message.setWrapperField(this, 13, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -51810,16 +51852,16 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.clearTempTradePeerNodeAddress
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.hasTempTradePeerNodeAddress = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.hasTempTradePeerNodeAddress = function() {
|
||||||
return jspb.Message.getField(this, 12) != null;
|
return jspb.Message.getField(this, 13) != null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional string multisig_address = 13;
|
* optional string multisig_address = 14;
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.getMultisigAddress = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.getMultisigAddress = function() {
|
||||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, ""));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -51828,21 +51870,21 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.getMultisigAddress = function
|
||||||
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.setMultisigAddress = function(value) {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.setMultisigAddress = function(value) {
|
||||||
return jspb.Message.setProto3StringField(this, 13, value);
|
return jspb.Message.setProto3StringField(this, 14, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional bytes mediated_payout_tx_signature = 17;
|
* optional bytes mediated_payout_tx_signature = 15;
|
||||||
* @return {!(string|Uint8Array)}
|
* @return {!(string|Uint8Array)}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.getMediatedPayoutTxSignature = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.getMediatedPayoutTxSignature = function() {
|
||||||
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 17, ""));
|
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, ""));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional bytes mediated_payout_tx_signature = 17;
|
* optional bytes mediated_payout_tx_signature = 15;
|
||||||
* This is a type-conversion wrapper around `getMediatedPayoutTxSignature()`
|
* This is a type-conversion wrapper around `getMediatedPayoutTxSignature()`
|
||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
|
@ -51853,7 +51895,7 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.getMediatedPayoutTxSignature_
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional bytes mediated_payout_tx_signature = 17;
|
* optional bytes mediated_payout_tx_signature = 15;
|
||||||
* Note that Uint8Array is not supported on all browsers.
|
* Note that Uint8Array is not supported on all browsers.
|
||||||
* @see http://caniuse.com/Uint8Array
|
* @see http://caniuse.com/Uint8Array
|
||||||
* This is a type-conversion wrapper around `getMediatedPayoutTxSignature()`
|
* This is a type-conversion wrapper around `getMediatedPayoutTxSignature()`
|
||||||
|
@ -51870,16 +51912,16 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.getMediatedPayoutTxSignature_
|
||||||
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.setMediatedPayoutTxSignature = function(value) {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.setMediatedPayoutTxSignature = function(value) {
|
||||||
return jspb.Message.setProto3BytesField(this, 17, value);
|
return jspb.Message.setProto3BytesField(this, 15, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional int64 buyer_payout_amount_from_mediation = 18;
|
* optional int64 buyer_payout_amount_from_mediation = 16;
|
||||||
* @return {number}
|
* @return {number}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.getBuyerPayoutAmountFromMediation = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.getBuyerPayoutAmountFromMediation = function() {
|
||||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0));
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -51888,16 +51930,16 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.getBuyerPayoutAmountFromMedia
|
||||||
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.setBuyerPayoutAmountFromMediation = function(value) {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.setBuyerPayoutAmountFromMediation = function(value) {
|
||||||
return jspb.Message.setProto3IntField(this, 18, value);
|
return jspb.Message.setProto3IntField(this, 16, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optional int64 seller_payout_amount_from_mediation = 19;
|
* optional int64 seller_payout_amount_from_mediation = 17;
|
||||||
* @return {number}
|
* @return {number}
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.getSellerPayoutAmountFromMediation = function() {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.getSellerPayoutAmountFromMediation = function() {
|
||||||
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0));
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -51906,7 +51948,25 @@ proto.io.haveno.protobuffer.ProcessModel.prototype.getSellerPayoutAmountFromMedi
|
||||||
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
||||||
*/
|
*/
|
||||||
proto.io.haveno.protobuffer.ProcessModel.prototype.setSellerPayoutAmountFromMediation = function(value) {
|
proto.io.haveno.protobuffer.ProcessModel.prototype.setSellerPayoutAmountFromMediation = function(value) {
|
||||||
return jspb.Message.setProto3IntField(this, 19, value);
|
return jspb.Message.setProto3IntField(this, 17, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional int64 delete_backups_height = 18;
|
||||||
|
* @return {number}
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.ProcessModel.prototype.getDeleteBackupsHeight = function() {
|
||||||
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {number} value
|
||||||
|
* @return {!proto.io.haveno.protobuffer.ProcessModel} returns this
|
||||||
|
*/
|
||||||
|
proto.io.haveno.protobuffer.ProcessModel.prototype.setDeleteBackupsHeight = function(value) {
|
||||||
|
return jspb.Message.setProto3IntField(this, 18, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
2
dist/protobuf/pb_pb.js.map
vendored
2
dist/protobuf/pb_pb.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -337,11 +337,11 @@ const TestConfig = {
|
||||||
version: "1.0.17"
|
version: "1.0.17"
|
||||||
},
|
},
|
||||||
monerod: {
|
monerod: {
|
||||||
url: "http://localhost:" + (getBaseCurrencyNetwork() == BaseCurrencyNetwork.XMR_LOCAL ? "4" : getNetworkStartPort()) + "8081", // 18081, 28081, 48081 for mainnet, stagenet, and local testnet, respectively
|
url: "http://localhost:" + getNetworkStartPort() + "8081", // 18081, 28081, 38081 for mainnet, testnet, and stagenet, respectively
|
||||||
username: "",
|
username: "",
|
||||||
password: ""
|
password: ""
|
||||||
},
|
},
|
||||||
monerod2: {
|
monerod3: { // corresponds to monerod3-local in Makefile
|
||||||
url: "http://localhost:58081",
|
url: "http://localhost:58081",
|
||||||
username: "superuser",
|
username: "superuser",
|
||||||
password: "abctesting123",
|
password: "abctesting123",
|
||||||
|
@ -693,7 +693,7 @@ test("Can manage an account (CI)", async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Can manage Monero daemon connections (CI)", async () => {
|
test("Can manage Monero daemon connections (CI)", async () => {
|
||||||
let monerod2: moneroTs.MoneroDaemonRpc | undefined = undefined;
|
let monerod3: moneroTs.MoneroDaemonRpc | undefined = undefined;
|
||||||
let user3: HavenoClient|undefined;
|
let user3: HavenoClient|undefined;
|
||||||
let err: any;
|
let err: any;
|
||||||
try {
|
try {
|
||||||
|
@ -720,48 +720,54 @@ test("Can manage Monero daemon connections (CI)", async () => {
|
||||||
|
|
||||||
// set prioritized connection without credentials
|
// set prioritized connection without credentials
|
||||||
await user3.setMoneroConnection(new UrlConnection()
|
await user3.setMoneroConnection(new UrlConnection()
|
||||||
.setUrl(TestConfig.monerod2.url)
|
.setUrl(TestConfig.monerod3.url)
|
||||||
.setPriority(1));
|
.setPriority(1));
|
||||||
connection = await user3.getMoneroConnection();
|
connection = await user3.getMoneroConnection();
|
||||||
testConnection(connection!, TestConfig.monerod2.url, undefined, undefined, 1); // status may or may not be known due to periodic connection checking
|
testConnection(connection!, TestConfig.monerod3.url, undefined, undefined, 1); // status may or may not be known due to periodic connection checking
|
||||||
|
|
||||||
// connection is offline
|
// connection is offline
|
||||||
connection = await user3.checkMoneroConnection();
|
connection = await user3.checkMoneroConnection();
|
||||||
assert(!await user3.isConnectedToMonero());
|
assert(!await user3.isConnectedToMonero());
|
||||||
testConnection(connection!, TestConfig.monerod2.url, OnlineStatus.OFFLINE, AuthenticationStatus.NO_AUTHENTICATION, 1);
|
testConnection(connection!, TestConfig.monerod3.url, OnlineStatus.OFFLINE, AuthenticationStatus.NO_AUTHENTICATION, 1);
|
||||||
|
|
||||||
// start monerod2
|
// start monerod3
|
||||||
const cmd = [
|
const cmd = [
|
||||||
TestConfig.moneroBinsDir + "/monerod",
|
TestConfig.moneroBinsDir + "/monerod",
|
||||||
"--no-igd",
|
"--no-igd",
|
||||||
"--hide-my-port",
|
"--hide-my-port",
|
||||||
"--data-dir", TestConfig.moneroBinsDir + "/" + TestConfig.baseCurrencyNetwork.toLowerCase() + "/testnode",
|
"--data-dir", TestConfig.moneroBinsDir + "/" + TestConfig.baseCurrencyNetwork.toLowerCase() + "/node3",
|
||||||
"--p2p-bind-port", TestConfig.monerod2.p2pBindPort,
|
"--p2p-bind-ip", "127.0.0.1",
|
||||||
"--rpc-bind-port", TestConfig.monerod2.rpcBindPort,
|
"--p2p-bind-port", TestConfig.monerod3.p2pBindPort,
|
||||||
"--no-zmq"
|
"--rpc-bind-port", TestConfig.monerod3.rpcBindPort,
|
||||||
|
"--zmq-rpc-bind-port", TestConfig.monerod3.zmqRpcBindPort,
|
||||||
|
"--log-level", "0",
|
||||||
|
"--confirm-external-bind",
|
||||||
|
"--rpc-access-control-origins", "http://localhost:8080",
|
||||||
|
"--fixed-difficulty", "500",
|
||||||
|
"--disable-rpc-ban"
|
||||||
];
|
];
|
||||||
if (getBaseCurrencyNetwork() !== BaseCurrencyNetwork.XMR_MAINNET) cmd.push("--" + moneroTs.MoneroNetworkType.toString(TestConfig.networkType).toLowerCase());
|
if (getBaseCurrencyNetwork() !== BaseCurrencyNetwork.XMR_MAINNET) cmd.push("--" + moneroTs.MoneroNetworkType.toString(TestConfig.networkType).toLowerCase());
|
||||||
if (TestConfig.monerod2.username) cmd.push("--rpc-login", TestConfig.monerod2.username + ":" + TestConfig.monerod2.password);
|
if (TestConfig.monerod3.username) cmd.push("--rpc-login", TestConfig.monerod3.username + ":" + TestConfig.monerod3.password);
|
||||||
monerod2 = await moneroTs.connectToDaemonRpc(cmd);
|
monerod3 = await moneroTs.connectToDaemonRpc(cmd);
|
||||||
|
|
||||||
// connection is online and not authenticated
|
// connection is online and not authenticated
|
||||||
connection = await user3.checkMoneroConnection();
|
connection = await user3.checkMoneroConnection();
|
||||||
assert(!await user3.isConnectedToMonero());
|
assert(!await user3.isConnectedToMonero());
|
||||||
testConnection(connection!, TestConfig.monerod2.url, OnlineStatus.ONLINE, AuthenticationStatus.NOT_AUTHENTICATED, 1);
|
testConnection(connection!, TestConfig.monerod3.url, OnlineStatus.ONLINE, AuthenticationStatus.NOT_AUTHENTICATED, 1);
|
||||||
|
|
||||||
// set connection credentials
|
// set connection credentials
|
||||||
await user3.setMoneroConnection(new UrlConnection()
|
await user3.setMoneroConnection(new UrlConnection()
|
||||||
.setUrl(TestConfig.monerod2.url)
|
.setUrl(TestConfig.monerod3.url)
|
||||||
.setUsername(TestConfig.monerod2.username)
|
.setUsername(TestConfig.monerod3.username)
|
||||||
.setPassword(TestConfig.monerod2.password)
|
.setPassword(TestConfig.monerod3.password)
|
||||||
.setPriority(1));
|
.setPriority(1));
|
||||||
connection = await user3.getMoneroConnection();
|
connection = await user3.getMoneroConnection();
|
||||||
testConnection(connection!, TestConfig.monerod2.url, undefined, undefined, 1);
|
testConnection(connection!, TestConfig.monerod3.url, undefined, undefined, 1);
|
||||||
|
|
||||||
// connection is online and authenticated
|
// connection is online and authenticated
|
||||||
connection = await user3.checkMoneroConnection();
|
connection = await user3.checkMoneroConnection();
|
||||||
assert(await user3.isConnectedToMonero());
|
assert(await user3.isConnectedToMonero());
|
||||||
testConnection(connection!, TestConfig.monerod2.url, OnlineStatus.ONLINE, AuthenticationStatus.AUTHENTICATED, 1);
|
testConnection(connection!, TestConfig.monerod3.url, OnlineStatus.ONLINE, AuthenticationStatus.AUTHENTICATED, 1);
|
||||||
|
|
||||||
// change account password
|
// change account password
|
||||||
const newPassword = "newPassword";
|
const newPassword = "newPassword";
|
||||||
|
@ -774,7 +780,7 @@ test("Can manage Monero daemon connections (CI)", async () => {
|
||||||
|
|
||||||
// connection is restored, online, and authenticated
|
// connection is restored, online, and authenticated
|
||||||
connection = await user3.getMoneroConnection();
|
connection = await user3.getMoneroConnection();
|
||||||
testConnection(connection!, TestConfig.monerod2.url, OnlineStatus.ONLINE, AuthenticationStatus.AUTHENTICATED, 1);
|
testConnection(connection!, TestConfig.monerod3.url, OnlineStatus.ONLINE, AuthenticationStatus.AUTHENTICATED, 1);
|
||||||
|
|
||||||
// priority connections are polled
|
// priority connections are polled
|
||||||
await wait(TestConfig.daemonPollPeriodMs * 2);
|
await wait(TestConfig.daemonPollPeriodMs * 2);
|
||||||
|
@ -785,8 +791,8 @@ test("Can manage Monero daemon connections (CI)", async () => {
|
||||||
await user3.setAutoSwitch(true);
|
await user3.setAutoSwitch(true);
|
||||||
|
|
||||||
// stop monerod
|
// stop monerod
|
||||||
//await monerod2.stopProcess(); // TODO (monero-ts): monerod remains available after await monerod.stopProcess() for up to 40 seconds
|
//await monerod3.stopProcess(); // TODO (monero-ts): monerod remains available after await monerod.stopProcess() for up to 40 seconds
|
||||||
await moneroTs.GenUtils.killProcess(monerod2.getProcess(), "SIGKILL");
|
await moneroTs.GenUtils.killProcess(monerod3.getProcess(), "SIGKILL");
|
||||||
|
|
||||||
// test auto switch after periodic connection check
|
// test auto switch after periodic connection check
|
||||||
await wait(TestConfig.daemonPollPeriodMs * 2);
|
await wait(TestConfig.daemonPollPeriodMs * 2);
|
||||||
|
@ -843,10 +849,14 @@ test("Can manage Monero daemon connections (CI)", async () => {
|
||||||
|
|
||||||
// stop processes
|
// stop processes
|
||||||
if (user3) await releaseHavenoProcess(user3, true);
|
if (user3) await releaseHavenoProcess(user3, true);
|
||||||
if (monerod2) await monerod2.stopProcess();
|
if (monerod3) await monerod3.stopProcess();
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// NOTE: To run full test, the following conditions must be met:
|
||||||
|
// - monerod1-local must be stopped
|
||||||
|
// - monerod2-local must be running
|
||||||
|
// - user1-daemon-local must be running and own its monerod process (so it can be stopped)
|
||||||
test("Can start and stop a local Monero node (CI)", async() => {
|
test("Can start and stop a local Monero node (CI)", async() => {
|
||||||
|
|
||||||
// expect error stopping local node
|
// expect error stopping local node
|
||||||
|
@ -890,12 +900,10 @@ test("Can start and stop a local Monero node (CI)", async() => {
|
||||||
// expect successful start with custom settings
|
// expect successful start with custom settings
|
||||||
const connectionsBefore = await user1.getMoneroConnections();
|
const connectionsBefore = await user1.getMoneroConnections();
|
||||||
const settings: XmrNodeSettings = new XmrNodeSettings();
|
const settings: XmrNodeSettings = new XmrNodeSettings();
|
||||||
const dataDir = TestConfig.moneroBinsDir + "/" + TestConfig.baseCurrencyNetwork + "/node1";
|
const dataDir = TestConfig.moneroBinsDir + "/" + TestConfig.baseCurrencyNetwork.toLowerCase() + "/node1";
|
||||||
const logFile = dataDir + "/test.log";
|
const logFile = dataDir + "/test.log";
|
||||||
const p2pPort = 38086;
|
|
||||||
const rpcPort = 38087;
|
|
||||||
settings.setBlockchainPath(dataDir);
|
settings.setBlockchainPath(dataDir);
|
||||||
settings.setStartupFlagsList(["--log-file", logFile, "--p2p-bind-port", p2pPort.toString(), "--rpc-bind-port", rpcPort.toString(), "--no-zmq"]);
|
settings.setStartupFlagsList(["--log-file", logFile, "--no-zmq"]);
|
||||||
await user1.startMoneroNode(settings);
|
await user1.startMoneroNode(settings);
|
||||||
isMoneroNodeOnline = await user1.isMoneroNodeOnline();
|
isMoneroNodeOnline = await user1.isMoneroNodeOnline();
|
||||||
assert(isMoneroNodeOnline);
|
assert(isMoneroNodeOnline);
|
||||||
|
@ -905,10 +913,9 @@ test("Can start and stop a local Monero node (CI)", async() => {
|
||||||
testMoneroNodeSettingsEqual(settings, settingsAfter!);
|
testMoneroNodeSettingsEqual(settings, settingsAfter!);
|
||||||
|
|
||||||
// expect connection to local monero node to succeed
|
// expect connection to local monero node to succeed
|
||||||
const rpcUrl = "http://127.0.0.1:" + rpcPort.toString();
|
let daemon = await moneroTs.connectToDaemonRpc(TestConfig.monerod.url, "superuser", "abctesting123");
|
||||||
let daemon = await moneroTs.connectToDaemonRpc(rpcUrl, "superuser", "abctesting123");
|
|
||||||
let height = await daemon.getHeight();
|
let height = await daemon.getHeight();
|
||||||
assert(height >= 0);
|
assert(height > 0);
|
||||||
|
|
||||||
// expect error due to existing running node
|
// expect error due to existing running node
|
||||||
const newSettings = new XmrNodeSettings();
|
const newSettings = new XmrNodeSettings();
|
||||||
|
@ -924,11 +931,12 @@ test("Can start and stop a local Monero node (CI)", async() => {
|
||||||
isMoneroNodeOnline = await user1.isMoneroNodeOnline();
|
isMoneroNodeOnline = await user1.isMoneroNodeOnline();
|
||||||
assert(!isMoneroNodeOnline);
|
assert(!isMoneroNodeOnline);
|
||||||
try {
|
try {
|
||||||
daemon = await moneroTs.connectToDaemonRpc(rpcUrl);
|
daemon = await moneroTs.connectToDaemonRpc(TestConfig.monerod.url);
|
||||||
height = await daemon.getHeight();
|
height = await daemon.getHeight();
|
||||||
|
console.log("GOT HEIGHT: " + height);
|
||||||
throw new Error("should have thrown");
|
throw new Error("should have thrown");
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
if (err.message !== "RequestError: Error: connect ECONNREFUSED 127.0.0.1:" + rpcPort.toString()) throw new Error("Unexpected error: " + err.message);
|
if (err.message !== "RequestError: Error: connect ECONNREFUSED 127.0.0.1:28081") throw new Error("Unexpected error: " + err.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -3822,9 +3830,9 @@ function testOffer(offer: OfferInfo, ctx?: Partial<TradeContext>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function testMoneroNodeSettingsEqual(settingsBefore: XmrNodeSettings, settingsAfter: XmrNodeSettings) {
|
function testMoneroNodeSettingsEqual(settingsBefore: XmrNodeSettings, settingsAfter: XmrNodeSettings) {
|
||||||
expect(settingsBefore.getBlockchainPath()).toEqual(settingsAfter.getBlockchainPath());
|
expect(settingsAfter.getBlockchainPath()).toEqual(settingsBefore.getBlockchainPath());
|
||||||
expect(settingsBefore.getBootstrapUrl()).toEqual(settingsAfter.getBootstrapUrl());
|
expect(settingsAfter.getBootstrapUrl()).toEqual(settingsBefore.getBootstrapUrl());
|
||||||
expect(settingsBefore.getStartupFlagsList()).toEqual(settingsAfter.getStartupFlagsList());
|
expect(settingsAfter.getStartupFlagsList()).toEqual(settingsBefore.getStartupFlagsList());
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFormField(form: PaymentAccountForm, fieldId: PaymentAccountFormField.FieldId): PaymentAccountFormField {
|
function getFormField(form: PaymentAccountForm, fieldId: PaymentAccountFormField.FieldId): PaymentAccountFormField {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue