@clonegod/ttd-sol-common 1.1.3 → 1.1.4
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.
|
@@ -691,9 +691,13 @@ class RpcClient {
|
|
|
691
691
|
].join(',');
|
|
692
692
|
const max_retry = Number(process.env.JITO_MAX_RETRIES || '0');
|
|
693
693
|
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
694
|
+
let jito_send_tx_ext_srv_list = process.env.JITO_SEND_TX_EXT_SRV_LIST || '';
|
|
695
|
+
if ((0, dist_1.isEmpty)(jito_send_tx_ext_srv_list)) {
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
jito_send_tx_ext_srv_list.split(';').filter(Boolean).forEach((region_group) => __awaiter(this, void 0, void 0, function* () {
|
|
699
|
+
let index = (0, dist_1.generateRandomNumber)(0, region_group.split(',').length - 1);
|
|
700
|
+
let host = region_group.split(',')[index];
|
|
697
701
|
let url = `http://${host}/solana/send_tx`;
|
|
698
702
|
(0, dist_1.postJSON)(url, {
|
|
699
703
|
encoding,
|
|
@@ -703,9 +707,9 @@ class RpcClient {
|
|
|
703
707
|
group_id,
|
|
704
708
|
max_retry
|
|
705
709
|
}).then(res => {
|
|
706
|
-
(0, dist_1.log_info)(`redirect tx to ${url} success`, res);
|
|
710
|
+
(0, dist_1.log_info)(`redirect tx ${txid} to ${url} success`, res);
|
|
707
711
|
}).catch(err => {
|
|
708
|
-
(0, dist_1.log_error)(`redirect tx to ${url} failed`, err);
|
|
712
|
+
(0, dist_1.log_error)(`redirect tx ${txid} to ${url} failed`, err);
|
|
709
713
|
});
|
|
710
714
|
}));
|
|
711
715
|
}), 0);
|