Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(core): remove msgTree #938

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions core/ts/__tests__/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,13 @@ describe("MaciState/Poll e2e", function test() {
let maciState: MaciState;
let pollId: bigint;
let poll: Poll;
let msgTree: IncrementalQuinTree;
const voteWeight = 9n;
const voteOptionIndex = 0n;
let stateIndex: number;
const userKeypair = new Keypair();

before(() => {
maciState = new MaciState(STATE_TREE_DEPTH);
msgTree = new IncrementalQuinTree(treeDepths.messageTreeDepth, NOTHING_UP_MY_SLEEVE, MESSAGE_TREE_ARITY, hash5);

pollId = maciState.deployPoll(
BigInt(Math.floor(Date.now() / 1000) + duration),
Expand Down Expand Up @@ -412,7 +410,6 @@ describe("MaciState/Poll e2e", function test() {
const message = command.encrypt(signature, sharedKey);

poll.publishMessage(message, ecdhKeypair.pubKey);
msgTree.insert(message.hash(ecdhKeypair.pubKey));

// Use the accumulator queue to compare the root of the message tree
const accumulatorQueue: AccQueue = new AccQueue(
Expand All @@ -424,7 +421,7 @@ describe("MaciState/Poll e2e", function test() {
accumulatorQueue.mergeSubRoots(0);
accumulatorQueue.merge(treeDepths.messageTreeDepth);

expect(accumulatorQueue.getRoot(treeDepths.messageTreeDepth)?.toString()).to.eq(msgTree.root.toString());
expect(accumulatorQueue.getRoot(treeDepths.messageTreeDepth)?.toString()).to.eq(poll.messageTree.root.toString());
});

it("packProcessMessageSmallVals and unpackProcessMessageSmallVals", () => {
Expand Down
Loading