Skip to content

Commit

Permalink
Fix port collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed Nov 9, 2023
1 parent c2479ab commit e784861
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions packages/portalnetwork/test/integration/integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ it('gossip test', async () => {
it('FindContent', async () => {
const id1 = await createFromProtobuf(hexToBytes(privateKeys[0]))
const enr1 = SignableENR.createFromPeerId(id1)
const initMa: any = multiaddr(`/ip4/127.0.0.1/udp/3000`)
const initMa: any = multiaddr(`/ip4/127.0.0.1/udp/3070`)
enr1.setLocationMultiaddr(initMa)
const id2 = await createFromProtobuf(hexToBytes(privateKeys[1]))
const enr2 = SignableENR.createFromPeerId(id2)
const initMa2: any = multiaddr(`/ip4/127.0.0.1/udp/3001`)
const initMa2: any = multiaddr(`/ip4/127.0.0.1/udp/3071`)
enr2.setLocationMultiaddr(initMa2)
const node1 = await PortalNetwork.create({
transport: TransportLayer.NODE,
Expand Down Expand Up @@ -216,11 +216,11 @@ it('FindContent', async () => {
it('eth_getBlockByHash', async () => {
const id1 = await createFromProtobuf(hexToBytes(privateKeys[0]))
const enr1 = SignableENR.createFromPeerId(id1)
const initMa: any = multiaddr(`/ip4/127.0.0.1/udp/3000`)
const initMa: any = multiaddr(`/ip4/127.0.0.1/udp/3080`)
enr1.setLocationMultiaddr(initMa)
const id2 = await createFromProtobuf(hexToBytes(privateKeys[1]))
const enr2 = SignableENR.createFromPeerId(id2)
const initMa2: any = multiaddr(`/ip4/127.0.0.1/udp/3001`)
const initMa2: any = multiaddr(`/ip4/127.0.0.1/udp/3081`)
enr2.setLocationMultiaddr(initMa2)
const node1 = await PortalNetwork.create({
transport: TransportLayer.NODE,
Expand Down Expand Up @@ -277,11 +277,11 @@ it('eth_getBlockByHash', async () => {
it('eth_getBlockByNumber', async () => {
const id1 = await createFromProtobuf(hexToBytes(privateKeys[0]))
const enr1 = SignableENR.createFromPeerId(id1)
const initMa: any = multiaddr(`/ip4/127.0.0.1/udp/3000`)
const initMa: any = multiaddr(`/ip4/127.0.0.1/udp/3090`)
enr1.setLocationMultiaddr(initMa)
const id2 = await createFromProtobuf(hexToBytes(privateKeys[1]))
const enr2 = SignableENR.createFromPeerId(id2)
const initMa2: any = multiaddr(`/ip4/127.0.0.1/udp/3001`)
const initMa2: any = multiaddr(`/ip4/127.0.0.1/udp/3091`)
enr2.setLocationMultiaddr(initMa2)
const node1 = await PortalNetwork.create({
transport: TransportLayer.NODE,
Expand Down
4 changes: 2 additions & 2 deletions packages/portalnetwork/test/integration/state.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ describe('State Network wire spec tests', () => {
it('should find another node', async () => {
const id1 = await createFromProtobuf(hexToBytes(privateKeys[0]))
const enr1 = SignableENR.createFromPeerId(id1)
const initMa: any = multiaddr(`/ip4/127.0.0.1/udp/3000`)
const initMa: any = multiaddr(`/ip4/127.0.0.1/udp/3020`)
enr1.setLocationMultiaddr(initMa)
const id2 = await createFromProtobuf(hexToBytes(privateKeys[1]))
const enr2 = SignableENR.createFromPeerId(id2)
const initMa2: any = multiaddr(`/ip4/127.0.0.1/udp/3001`)
const initMa2: any = multiaddr(`/ip4/127.0.0.1/udp/3021`)
enr2.setLocationMultiaddr(initMa2)
const node1 = await PortalNetwork.create({
transport: TransportLayer.NODE,
Expand Down

0 comments on commit e784861

Please sign in to comment.