Skip to content

Commit 55364b0

Browse files
committed
fix: adding hard fork if to reference payment non existence
1 parent 018b55a commit 55364b0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/verification/referenced-payment-nonexistence/referenced-payment-nonexistence.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,22 @@ export function responseReferencedPaymentNonExistence<
109109
}
110110
}
111111

112+
// TODO: Remove me after Mon Sept 08 2025
113+
// Hard fork if
114+
let minBlockTs = lowerBoundaryBlock.blockNumber.toString();
115+
const now = Math.round(Date.now() / 1000);
116+
if (now > 1757314800) {
117+
minBlockTs = lowerBoundaryBlock.timestamp.toString();
118+
}
119+
112120
const response = new ReferencedPaymentNonexistence_Response({
113121
attestationType: request.attestationType,
114122
sourceId: request.sourceId,
115123
votingRound: '0',
116124
lowestUsedTimestamp: lowerBoundaryBlock.timestamp.toString(),
117125
requestBody: serializeBigInts(request.requestBody),
118126
responseBody: new ReferencedPaymentNonexistence_ResponseBody({
119-
minimalBlockTimestamp: lowerBoundaryBlock.timestamp.toString(),
127+
minimalBlockTimestamp: minBlockTs,
120128
firstOverflowBlockNumber: firstOverflowBlock.blockNumber.toString(),
121129
firstOverflowBlockTimestamp: firstOverflowBlock.timestamp.toString(),
122130
}),

0 commit comments

Comments
 (0)