@clonegod/ttd-sol-common 1.0.61 → 1.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -67,6 +67,10 @@ class AppConfig extends events_1.EventEmitter {
|
|
|
67
67
|
const refresh_trade_runtime = (is_sussess, event) => __awaiter(this, void 0, void 0, function* () {
|
|
68
68
|
(0, dist_1.log_info)(`subscribe_config_change_event, callback`, { is_sussess, event });
|
|
69
69
|
if (event.event_type === dist_1.REDIS_EVENT_TYPE_CONFIG_CHANGE.GROUP_CONFIG_CHANGE) {
|
|
70
|
+
if (!this.trade_runtime) {
|
|
71
|
+
(0, dist_1.log_warn)(`refresh_trade_runtime, skip...`);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
70
74
|
this.trade_runtime = yield this.arb_cache.create_trade_runtime(this.trade_runtime.chain_id, this.trade_runtime.group.id, this.trade_runtime.dex_id, this.trade_runtime.pair_name);
|
|
71
75
|
}
|
|
72
76
|
});
|
|
@@ -485,7 +485,7 @@ class RpcClient {
|
|
|
485
485
|
let error;
|
|
486
486
|
do {
|
|
487
487
|
try {
|
|
488
|
-
const signature = yield this.connection.sendRawTransaction(transaction.serialize(), Object.assign({ maxRetries:
|
|
488
|
+
const signature = yield this.connection.sendRawTransaction(transaction.serialize(), Object.assign({ maxRetries: 3, preflightCommitment: 'confirmed', skipPreflight: sendOptions.skipPreflight, minContextSlot }, sendOptions));
|
|
489
489
|
const abortSignal = AbortSignal.timeout(15000);
|
|
490
490
|
yield this.connection.confirmTransaction({
|
|
491
491
|
abortSignal,
|
|
@@ -19,7 +19,7 @@ class HeliusClient {
|
|
|
19
19
|
this.signers = signers;
|
|
20
20
|
this.sendOptions = {
|
|
21
21
|
skipPreflight: true,
|
|
22
|
-
maxRetries:
|
|
22
|
+
maxRetries: 3
|
|
23
23
|
};
|
|
24
24
|
let helius_api_key = process.env.HELIUS_API_KEY;
|
|
25
25
|
let helius_mainnet_endpoint = `https://mainnet.helius-rpc.com/?api-key=${helius_api_key}`;
|
|
@@ -93,7 +93,7 @@ class TransactionResultChecker {
|
|
|
93
93
|
let { group_id, unique_order_msg_id, order_send_time, order_recv_time, order_submit_time, aToB } = this.order_msg;
|
|
94
94
|
let order_price = aToB ? bid.price : ask.price;
|
|
95
95
|
let server_info = (0, dist_1.getServerInfo)();
|
|
96
|
-
let total_order_time = (order_block_time +
|
|
96
|
+
let total_order_time = (order_block_time + 1000) - order_recv_time;
|
|
97
97
|
let order_end_time = Date.now();
|
|
98
98
|
let start_time = order_recv_time;
|
|
99
99
|
let end_time = order_end_time;
|