@clonegod/ttd-sol-common 1.1.1 → 1.1.3
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.
|
@@ -629,16 +629,19 @@ class RpcClient {
|
|
|
629
629
|
serializedTipTx
|
|
630
630
|
].join(',');
|
|
631
631
|
}
|
|
632
|
+
const max_retry = Number(process.env.JITO_MAX_RETRIES || '10');
|
|
632
633
|
const send_result = yield (0, dist_1.postJSON)(send_tx_jito_url, {
|
|
633
634
|
encoding,
|
|
634
635
|
encoded_tx,
|
|
635
636
|
txid,
|
|
636
637
|
trace_id: '',
|
|
637
|
-
group_id
|
|
638
|
+
group_id,
|
|
639
|
+
max_retry
|
|
638
640
|
});
|
|
639
641
|
(0, dist_1.log_info)(`sendJitoBundle (mul_ips)`, {
|
|
640
642
|
txid,
|
|
641
643
|
jito_use_separate_tx,
|
|
644
|
+
max_retry,
|
|
642
645
|
send_result
|
|
643
646
|
});
|
|
644
647
|
return;
|
|
@@ -686,16 +689,38 @@ class RpcClient {
|
|
|
686
689
|
serializedTipTx,
|
|
687
690
|
serializedMainTx
|
|
688
691
|
].join(',');
|
|
692
|
+
const max_retry = Number(process.env.JITO_MAX_RETRIES || '0');
|
|
693
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
694
|
+
var _a;
|
|
695
|
+
let gateway_list = ((_a = process.env.JITO_SEND_TX_GATEWAY_LIST) === null || _a === void 0 ? void 0 : _a.split(',').filter(Boolean)) || [];
|
|
696
|
+
gateway_list.forEach((host) => __awaiter(this, void 0, void 0, function* () {
|
|
697
|
+
let url = `http://${host}/solana/send_tx`;
|
|
698
|
+
(0, dist_1.postJSON)(url, {
|
|
699
|
+
encoding,
|
|
700
|
+
encoded_tx,
|
|
701
|
+
txid,
|
|
702
|
+
trace_id: '',
|
|
703
|
+
group_id,
|
|
704
|
+
max_retry
|
|
705
|
+
}).then(res => {
|
|
706
|
+
(0, dist_1.log_info)(`redirect tx to ${url} success`, res);
|
|
707
|
+
}).catch(err => {
|
|
708
|
+
(0, dist_1.log_error)(`redirect tx to ${url} failed`, err);
|
|
709
|
+
});
|
|
710
|
+
}));
|
|
711
|
+
}), 0);
|
|
689
712
|
const send_result = yield (0, dist_1.postJSON)(send_tx_jito_url, {
|
|
690
713
|
encoding,
|
|
691
714
|
encoded_tx,
|
|
692
715
|
txid,
|
|
693
716
|
trace_id: '',
|
|
694
|
-
group_id
|
|
717
|
+
group_id,
|
|
718
|
+
max_retry
|
|
695
719
|
});
|
|
696
720
|
(0, dist_1.log_info)(`sendJitoBundle (mul_ips)`, {
|
|
697
721
|
txid,
|
|
698
722
|
jito_use_separate_tx,
|
|
723
|
+
max_retry,
|
|
699
724
|
send_result
|
|
700
725
|
});
|
|
701
726
|
return;
|