Skip to content

Commit

Permalink
Add key assignment struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel committed Nov 1, 2022
1 parent 42c2593 commit c75a588
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/difference/core/model/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ type EndAndBeginBlock = {
chain: Chain;
};

type KeyAssignment = {
kind: string;
};

type SystemSnapshot = {
h: Record<Chain, number>;
t: Record<Chain, number>;
Expand Down Expand Up @@ -204,6 +208,7 @@ export {
UpdateClient,
Deliver,
EndAndBeginBlock,
KeyAssignment,
SystemSnapshot,
Status,
Undelegation,
Expand Down
9 changes: 9 additions & 0 deletions tests/difference/core/model/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
UpdateClient,
Deliver,
EndAndBeginBlock,
KeyAssignment,
TraceAction,
Chain,
Consequence,
Expand Down Expand Up @@ -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`;
};

Expand Down Expand Up @@ -142,6 +148,9 @@ class ActionGenerator {
this.tLastTrustedHeader[chain] + TRUSTING_SECONDS
);
}
if (a.kind === 'KeyAssignment') {
return true;
}
throw `kind doesn't match`;
};

Expand Down

0 comments on commit c75a588

Please sign in to comment.