Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Update tests for interop cross chain updates #9138

Merged
merged 11 commits into from
Nov 23, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export abstract class BaseCrossChainUpdateCommand<
}
}

// https://github.com/LiskHQ/lips/blob/main/proposals/lip-0053.md#beforecrosschainmessagesexecution
protected async beforeCrossChainMessagesExecution(
context: CommandExecuteContext<CrossChainUpdateTransactionParams>,
isMainchain: boolean,
Expand Down Expand Up @@ -195,6 +196,7 @@ export abstract class BaseCrossChainUpdateCommand<
return [ccms, true];
}

// https://github.com/LiskHQ/lips/blob/main/proposals/lip-0053.md#verifyroutingrules
protected verifyRoutingRules(
ccm: CCMsg,
ccuParams: CrossChainUpdateTransactionParams,
Expand All @@ -219,7 +221,8 @@ export abstract class BaseCrossChainUpdateCommand<
}
}

protected async afterCrossChainMessagesExecute(
// https://github.com/LiskHQ/lips/blob/main/proposals/lip-0053.md#aftercrosschainmessagesexecution
protected async afterCrossChainMessagesExecution(
context: CommandExecuteContext<CrossChainUpdateTransactionParams>,
) {
const { params } = context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class SubmitMainchainCrossChainUpdateCommand extends BaseCrossChainUpdate
context.contextStore.delete(CONTEXT_STORE_KEY_CCM_PROCESSING);
}

await this.afterCrossChainMessagesExecute(context);
await this.afterCrossChainMessagesExecution(context);
}

private async _beforeCrossChainMessageForwarding(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { getIDFromCCMBytes } from '../../utils';
import { SidechainInteroperabilityInternalMethod } from '../internal_method';

// https://github.com/LiskHQ/lips/blob/main/proposals/lip-0053.md#sidechaincrosschainupdate

export class SubmitSidechainCrossChainUpdateCommand extends BaseCrossChainUpdateCommand<SidechainInteroperabilityInternalMethod> {
public async verify(
context: CommandVerifyContext<CrossChainUpdateTransactionParams>,
Expand Down Expand Up @@ -81,6 +80,6 @@ export class SubmitSidechainCrossChainUpdateCommand extends BaseCrossChainUpdate
context.contextStore.delete(CONTEXT_STORE_KEY_CCM_PROCESSING);
}

await this.afterCrossChainMessagesExecute(context);
await this.afterCrossChainMessagesExecution(context);
}
}
Loading