diff --git a/packages/lodestar/test/unit/network/reqresp/encodingStrategies/sszSnappy/encode.test.ts b/packages/lodestar/test/unit/network/reqresp/encodingStrategies/sszSnappy/encode.test.ts index 632c25efefe..eaf279ac6ab 100644 --- a/packages/lodestar/test/unit/network/reqresp/encodingStrategies/sszSnappy/encode.test.ts +++ b/packages/lodestar/test/unit/network/reqresp/encodingStrategies/sszSnappy/encode.test.ts @@ -23,7 +23,7 @@ describe("network / reqresp / sszSnappy / encode", () => { const testCases = [sszSnappyPing, sszSnappyStatus, sszSnappySignedBeaconBlockPhase0]; for (const testCase of testCases) { - const {id, type, syncChunks} = testCase; + const {id, type, chunks} = testCase; it(id, async () => { const body = type === ssz.phase0.SignedBeaconBlock @@ -36,7 +36,7 @@ describe("network / reqresp / sszSnappy / encode", () => { ), all ); - expectEqualByteChunks(encodedChunks, syncChunks); + expectEqualByteChunks(encodedChunks, chunks); }); } }); diff --git a/packages/lodestar/test/unit/network/reqresp/encodingStrategies/sszSnappy/testData.ts b/packages/lodestar/test/unit/network/reqresp/encodingStrategies/sszSnappy/testData.ts index ad6d14d2610..9d77c94c838 100644 --- a/packages/lodestar/test/unit/network/reqresp/encodingStrategies/sszSnappy/testData.ts +++ b/packages/lodestar/test/unit/network/reqresp/encodingStrategies/sszSnappy/testData.ts @@ -10,21 +10,21 @@ export interface ISszSnappyTestData { type: RequestOrResponseType; body: T; /** chunks expected in an async compress version of snappy stream */ - chunks: Buffer[]; + asyncChunks: Buffer[]; /** chunks expected in a sync compress version of snappy stream */ - syncChunks: Buffer[]; + chunks: Buffer[]; } export const sszSnappyPing: ISszSnappyTestData = { id: "Ping type", type: ssz.phase0.Ping, body: BigInt(1), - chunks: [ + asyncChunks: [ "0x08", // length prefix "0xff060000734e61507059", // snappy frames header "0x010c00000175de410100000000000000", // snappy frames content ].map(fromHexString) as Buffer[], - syncChunks: ["0x08", "0xff060000734e61507059010c00000175de410100000000000000"].map(fromHexString) as Buffer[], + chunks: ["0x08", "0xff060000734e61507059010c00000175de410100000000000000"].map(fromHexString) as Buffer[], }; export const sszSnappyStatus: ISszSnappyTestData = { @@ -37,12 +37,12 @@ export const sszSnappyStatus: ISszSnappyTestData = { headRoot: Buffer.alloc(32, 0xda), headSlot: 9, }, - chunks: [ + asyncChunks: [ "0x54", // length prefix "0xff060000734e61507059", // snappy frames header "0x001b0000097802c15400da8a010004090009017e2b001c0900000000000000", ].map(fromHexString) as Buffer[], - syncChunks: ["0x54", "0xff060000734e61507059001b0000097802c15400da8a010004090009017e2b001c0900000000000000"].map( + chunks: ["0x54", "0xff060000734e61507059001b0000097802c15400da8a010004090009017e2b001c0900000000000000"].map( fromHexString ) as Buffer[], }; @@ -73,12 +73,12 @@ export const sszSnappySignedBeaconBlockPhase0: ISszSnappyTestData