Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottyPoi committed Dec 6, 2024
1 parent f87e4a5 commit efb1311
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/portalnetwork/test/integration/beacon.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ describe('Find Content tests', () => {
hexToBytes(optimisticUpdate.content_value),
)
const res = await network2.sendFindContent(
node1.discv5.enr.nodeId,
node1.discv5.enr.toENR(),
concatBytes(
new Uint8Array([0x13]),
LightClientOptimisticUpdateKey.serialize({ signatureSlot: 6718463n }),
Expand Down Expand Up @@ -238,7 +238,7 @@ describe('Find Content tests', () => {
await network1.storeUpdateRange(hexToBytes(updatesByRange.content_value))

const res = await network2.sendFindContent(
node1.discv5.enr.nodeId,
node1.discv5.enr.toENR(),
hexToBytes(updatesByRange.content_key),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('FindContent', async () => {
await network1.sendPing(network2?.enr!.toENR())

const res = await network2.sendFindContent(
node1.discv5.enr.nodeId,
node1.discv5.enr.toENR(),
getContentKey(HistoryNetworkContentType.BlockHeaderByNumber, BigInt(testBlockData[29].number)),
)
const headerWithProof = BlockHeaderWithProof.deserialize(res!['content'] as Uint8Array)
Expand Down
2 changes: 1 addition & 1 deletion packages/portalnetwork/test/integration/state.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('AccountTrieNode Gossip / Request', async () => {
const expected = AccountTrieNodeRetrieval.serialize({ node: proof[2] })
const contentKey = (await network2.db.db.keys().next())!
const requested = await network1.sendFindContent(
node2.discv5.enr.nodeId,
node2.discv5.enr.toENR(),
hexToBytes(contentKey),
)
expect(requested).toBeDefined()

Check failure on line 102 in packages/portalnetwork/test/integration/state.spec.ts

View workflow job for this annotation

GitHub Actions / test-integration-portalnetwork (20)

test/integration/state.spec.ts > AccountTrieNode Gossip / Request > should request individual node from peer

AssertionError: expected undefined not to be undefined ❯ test/integration/state.spec.ts:102:23
Expand Down

0 comments on commit efb1311

Please sign in to comment.