feat: 增强下游重投与签名质量检测
This commit is contained in:
@@ -68,11 +68,15 @@ for (const expected of contract.methods) {
|
||||
}
|
||||
}
|
||||
|
||||
if (facadeMethods.size !== 98) {
|
||||
if (facadeMethods.size !== 104) {
|
||||
throw new Error(`R10 changed the stable SendChainService method count: ${facadeMethods.size}`);
|
||||
}
|
||||
|
||||
const combined = [...domainSources.values()].map((item) => item.source).join('\n');
|
||||
const downstreamTaskSource = fs.readFileSync(
|
||||
path.join(root, 'api/src/send-chain/send-downstream-requeue-task.service.ts'),
|
||||
'utf8',
|
||||
);
|
||||
const gatewaySubmitSource = fs.readFileSync(
|
||||
path.join(root, 'api/src/send-chain/send-gateway-submit.service.ts'),
|
||||
'utf8',
|
||||
@@ -90,8 +94,10 @@ for (const invariant of [
|
||||
'gatewaySubmitRequeueKey',
|
||||
'recordReceiptSegment',
|
||||
'aggregateReceiptSegments',
|
||||
'previewDownstreamRequeueTask',
|
||||
'changeDownstreamRequeueTaskStatus',
|
||||
]) {
|
||||
if (!(combined + gatewaySubmitSource).includes(invariant)) {
|
||||
if (!(combined + gatewaySubmitSource + downstreamTaskSource + facadeSource).includes(invariant)) {
|
||||
throw new Error(`R10 accident invariant missing: ${invariant}`);
|
||||
}
|
||||
}
|
||||
@@ -106,5 +112,5 @@ if (!moduleSource.includes('providers: [SendChainService]') || moduleSource.incl
|
||||
|
||||
console.log(
|
||||
`R10 send completion verified: ${contract.methods.length} methods across ${contract.domains.length} domains; `
|
||||
+ '98 stable facade methods and accident invariants preserved.',
|
||||
+ '104 stable facade methods and accident invariants preserved.',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user