Skip to content

Commit

Permalink
fix: lint in ssz package
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths committed Nov 9, 2024
1 parent 7ed3ced commit d3821ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/ssz/test/spec/runValidTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ export function runValidSszTest(type: Type<unknown>, testData: ValidTestCaseData
if (type.isBasic) {
console.log("Chunk Bytes Basic", toHexString(type.serialize(testDataValue)));
} else {
const chunkBytes = (type as CompositeType<unknown, unknown, unknown>)["getChunkBytes"](testDataValue);
console.log("Chunk Bytes Composite", toHexString(chunkBytes));
const blocksBytes = (type as CompositeType<unknown, unknown, unknown>)["getBlocksBytes"](testDataValue);
console.log("Blocks Bytes Composite", toHexString(blocksBytes));
}
}

Expand Down
6 changes: 3 additions & 3 deletions packages/ssz/test/unit/merkleize.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {expect} from "chai";
import {bitLength, maxChunksToDepth, merkleize, mixInLength, nextPowerOf2} from "../../src/util/merkleize";
import {merkleizeInto, LeafNode, zeroHash} from "@chainsafe/persistent-merkle-tree";
import {merkleizeBlocksBytes, LeafNode, zeroHash} from "@chainsafe/persistent-merkle-tree";

describe("util / merkleize / bitLength", () => {
const bitLengthByIndex = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4];
Expand Down Expand Up @@ -41,7 +41,7 @@ describe("util / merkleize / mixInLength", () => {
mixInLengthBuffer.set(root, 0);
mixInLengthBuffer.writeUIntLE(length, 32, 6);
const finalRoot = new Uint8Array(32);
merkleizeInto(mixInLengthBuffer, 2, finalRoot, 0);
merkleizeBlocksBytes(mixInLengthBuffer, 2, finalRoot, 0);
const expectedRoot = mixInLength(root, length);
expect(finalRoot).to.be.deep.equal(expectedRoot);
});
Expand All @@ -58,7 +58,7 @@ describe("merkleize should be equal to merkleizeInto of hasher", () => {
const roots = nodes.map((node) => node.root);
const expectedRoot = Buffer.alloc(32);
const chunkCount = Math.max(numNode, 1);
merkleizeInto(padData, chunkCount, expectedRoot, 0);
merkleizeBlocksBytes(padData, chunkCount, expectedRoot, 0);
expect(merkleize(roots, chunkCount)).to.be.deep.equal(expectedRoot);
});
}
Expand Down

0 comments on commit d3821ee

Please sign in to comment.