From c75a588ee2086429365f6cdafcf596a6bf87b6e9 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 1 Nov 2022 18:33:13 +0000 Subject: [PATCH] Add key assignment struct --- tests/difference/core/model/src/common.ts | 5 +++++ tests/difference/core/model/src/main.ts | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/tests/difference/core/model/src/common.ts b/tests/difference/core/model/src/common.ts index 7a6073cfcc..3004dcbe87 100644 --- a/tests/difference/core/model/src/common.ts +++ b/tests/difference/core/model/src/common.ts @@ -109,6 +109,10 @@ type EndAndBeginBlock = { chain: Chain; }; +type KeyAssignment = { + kind: string; +}; + type SystemSnapshot = { h: Record; t: Record; @@ -204,6 +208,7 @@ export { UpdateClient, Deliver, EndAndBeginBlock, + KeyAssignment, SystemSnapshot, Status, Undelegation, diff --git a/tests/difference/core/model/src/main.ts b/tests/difference/core/model/src/main.ts index 9291693b56..0762b77c8a 100644 --- a/tests/difference/core/model/src/main.ts +++ b/tests/difference/core/model/src/main.ts @@ -23,6 +23,7 @@ import { UpdateClient, Deliver, EndAndBeginBlock, + KeyAssignment, TraceAction, Chain, Consequence, @@ -109,6 +110,11 @@ class ActionGenerator { chain: _.sample([P, C]) as Chain, } as EndAndBeginBlock; } + if (kind == 'KeyAssignment') { + return { + kind, + } as KeyAssignment; + } throw `kind doesn't match`; }; @@ -142,6 +148,9 @@ class ActionGenerator { this.tLastTrustedHeader[chain] + TRUSTING_SECONDS ); } + if (a.kind === 'KeyAssignment') { + return true; + } throw `kind doesn't match`; };