@clonegod/ttd-sui-common 1.0.46 → 1.0.48
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.
|
@@ -94,16 +94,15 @@ class SimpleRedisClient {
|
|
|
94
94
|
}
|
|
95
95
|
finally {
|
|
96
96
|
if (acquired) {
|
|
97
|
-
(0, dist_1.log_info)('start release lock');
|
|
98
97
|
const release_delay = parseInt(process.env.NONCE_LOCK_RELEASE_DELAY_MS || String(release_lock_delay_ms));
|
|
99
98
|
if (release_delay > 0) {
|
|
100
99
|
yield (0, dist_1.sleep)(release_delay);
|
|
101
100
|
}
|
|
102
101
|
yield this.releaseLock(lock_key, lock_value);
|
|
103
|
-
(0, dist_1.log_info)(`withLock success: lock_key=${lock_key}, retry_times=${retries
|
|
102
|
+
(0, dist_1.log_info)(`withLock success: lock_key=${lock_key}, retry_times=${retries}, hold_lock=${Date.now() - lock_acquired_time}ms`);
|
|
104
103
|
}
|
|
105
104
|
else {
|
|
106
|
-
(0, dist_1.log_warn)(`withLock failed: lock_key=${lock_key}, retry_times=${retries
|
|
105
|
+
(0, dist_1.log_warn)(`withLock failed: lock_key=${lock_key}, retry_times=${retries}, total_time=${Date.now() - lock_start_time}ms`);
|
|
107
106
|
}
|
|
108
107
|
}
|
|
109
108
|
});
|
|
@@ -67,7 +67,8 @@ class TransactionResultChecker extends trade_1.AbstractTransactionResultCheck {
|
|
|
67
67
|
(0, dist_1.log_info)(`re-fetch tx result by ledgerService start, i=${i}, txid=${this.txid}`);
|
|
68
68
|
try {
|
|
69
69
|
let txReceipt = yield this.leadgerService.getTransaction(this.txid, ['*']);
|
|
70
|
-
if (!txReceipt) {
|
|
70
|
+
if (!txReceipt || (0, dist_1.isEmpty)(txReceipt)) {
|
|
71
|
+
console.log('txReceipt is empty', txReceipt);
|
|
71
72
|
continue;
|
|
72
73
|
}
|
|
73
74
|
const success = (_c = (_b = (_a = txReceipt.transaction) === null || _a === void 0 ? void 0 : _a.effects) === null || _b === void 0 ? void 0 : _b.status) === null || _c === void 0 ? void 0 : _c.success;
|
|
@@ -77,6 +78,10 @@ class TransactionResultChecker extends trade_1.AbstractTransactionResultCheck {
|
|
|
77
78
|
this.processTransactionResult(txReceipt, 'grpc2');
|
|
78
79
|
break;
|
|
79
80
|
}
|
|
81
|
+
else {
|
|
82
|
+
(0, dist_1.log_warn)(`re-fetch tx result by ledgerService failed, i=${i}, txid=${this.txid}`);
|
|
83
|
+
console.dir(txReceipt, { depth: 4 });
|
|
84
|
+
}
|
|
80
85
|
}
|
|
81
86
|
catch (error) {
|
|
82
87
|
(0, dist_1.log_warn)(`re-fetch tx result by ledgerService failed, i=${i}, txid=${this.txid}, error=${error.message}`);
|