fix: core check pass

This commit is contained in:
fryorcraken.eth 2022-11-01 19:33:33 +11:00
parent fe818580f2
commit 9d74c9f6fe
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
11 changed files with 26 additions and 27 deletions

View File

@ -1,10 +1,10 @@
import { createLightNode } from "@waku/create";
import type { WakuLight } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces";
import { expect } from "chai";
import { makeLogFileName, NOISE_KEY_1, Nwaku } from "../../test_utils";
import type { WakuLight } from "../interfaces";
import { waitForRemotePeer } from "../wait_for_remote_peer";
import { Protocols } from "../waku";
import { ENR } from "./enr";
@ -92,7 +92,7 @@ describe("ENR Interop: nwaku", function () {
});
const multiAddrWithId = await nwaku.getMultiaddrWithId();
waku = await createWaku({
waku = await createLightNode({
staticNoiseKey: NOISE_KEY_1,
});
await waku.start();

View File

@ -1,12 +1,12 @@
import { createLightNode, createPrivacyNode } from "@waku/create";
import type { WakuLight, WakuPrivacy } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces";
import { expect } from "chai";
import { makeLogFileName, NOISE_KEY_1, Nwaku } from "../test_utils";
import { delay } from "../test_utils/delay";
import type { WakuLight, WakuPrivacy } from "./interfaces";
import { waitForRemotePeer } from "./wait_for_remote_peer";
import { Protocols } from "./waku";
describe("Wait for remote peer", function () {
let waku1: WakuPrivacy;

View File

@ -1,5 +1,7 @@
import type { PeerId } from "@libp2p/interface-peer-id";
import { createLightNode, createPrivacyNode } from "@waku/create";
import type { Message, Waku, WakuLight, WakuPrivacy } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces";
import { expect } from "chai";
import {
@ -10,11 +12,9 @@ import {
} from "../test_utils/";
import { generateSymmetricKey } from "./crypto";
import type { Message, Waku, WakuLight, WakuPrivacy } from "./interfaces";
import { PeerDiscoveryStaticPeers } from "./peer_discovery_static_list";
import { bytesToUtf8, utf8ToBytes } from "./utils";
import { waitForRemotePeer } from "./wait_for_remote_peer";
import { Protocols } from "./waku";
import { SymDecoder, SymEncoder } from "./waku_message/version_1.js";
const TestContentTopic = "/test/1/waku/utf8";

View File

@ -1,12 +1,11 @@
import type { PeerId } from "@libp2p/interface-peer-id";
import { createWaku } from "@waku/create";
import { createLightNode } from "@waku/create";
import type { WakuLight } from "@waku/interfaces";
import { expect } from "chai";
import type { Waku } from "./interfaces";
describe("Waku Dial", function () {
describe("Bootstrap [live data]", function () {
let waku: Waku;
let waku: WakuLight;
afterEach(function () {
!!waku && waku.stop().catch((e) => console.log("Waku failed to stop", e));
@ -23,7 +22,7 @@ describe("Waku Dial", function () {
// This dependence must be removed once DNS discovery is implemented
this.timeout(20_000);
waku = await createWaku({
waku = await createLightNode({
defaultBootstrap: true,
});
await waku.start();

View File

@ -1,13 +1,13 @@
import { createFullNode } from "@waku/create";
import type { Message, WakuFull } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces";
import { expect } from "chai";
import debug from "debug";
import { makeLogFileName, NOISE_KEY_1, Nwaku } from "../../test_utils";
import { delay } from "../../test_utils/delay";
import { createFullNode } from "../create_waku";
import type { Message, WakuFull } from "../interfaces";
import { bytesToUtf8, utf8ToBytes } from "../utils";
import { waitForRemotePeer } from "../wait_for_remote_peer";
import { Protocols } from "../waku";
import { DecoderV0, EncoderV0 } from "../waku_message/version_0";
const log = debug("waku:test");

View File

@ -82,7 +82,7 @@ export class WakuFilter implements Filter {
callback: Callback<T>,
opts?: ProtocolOptions
): Promise<UnsubscribeFunction> {
const topic = opts?.pubsubTopic ?? this.pubSubTopic;
const topic = opts?.pubSubTopic ?? this.pubSubTopic;
const groupedDecoders = groupByContentTopic(decoders);
const contentTopics = Array.from(groupedDecoders.keys());

View File

@ -1,3 +1,6 @@
import { createFullNode } from "@waku/create";
import type { WakuFull } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces";
import { expect } from "chai";
import debug from "debug";
@ -8,11 +11,8 @@ import {
Nwaku,
} from "../../test_utils";
import { delay } from "../../test_utils/delay";
import { createFullNode } from "../create_waku";
import type { WakuFull } from "../interfaces";
import { bytesToUtf8, utf8ToBytes } from "../utils";
import { waitForRemotePeer } from "../wait_for_remote_peer";
import { Protocols } from "../waku";
import { EncoderV0 } from "../waku_message/version_0";
const log = debug("waku:test:lightpush");

View File

@ -56,7 +56,7 @@ export class WakuLightPush {
message: Partial<Message>,
opts?: ProtocolOptions
): Promise<SendResult> {
const pubSubTopic = opts?.pubsubTopic ? opts.pubsubTopic : this.pubSubTopic;
const pubSubTopic = opts?.pubSubTopic ? opts.pubSubTopic : this.pubSubTopic;
const res = await selectPeerForProtocol(
this.libp2p.peerStore,

View File

@ -1,4 +1,7 @@
import { PeerId } from "@libp2p/interface-peer-id";
import { createPrivacyNode } from "@waku/create";
import type { Message, WakuPrivacy } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces";
import { expect } from "chai";
import debug from "debug";
@ -12,16 +15,13 @@ import {
} from "../../test_utils";
import { delay } from "../../test_utils/delay";
import { DefaultPubSubTopic } from "../constants";
import { createPrivacyNode } from "../create_waku";
import {
generatePrivateKey,
generateSymmetricKey,
getPublicKey,
} from "../crypto";
import type { Message, WakuPrivacy } from "../interfaces";
import { bytesToUtf8, utf8ToBytes } from "../utils";
import { waitForRemotePeer } from "../wait_for_remote_peer";
import { Protocols } from "../waku";
import { DecoderV0, EncoderV0, MessageV0 } from "../waku_message/version_0.js";
import {
AsymDecoder,

View File

@ -1,3 +1,6 @@
import { createFullNode } from "@waku/create";
import type { Message, WakuFull } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces";
import { expect } from "chai";
import debug from "debug";
@ -7,16 +10,13 @@ import {
NOISE_KEY_2,
Nwaku,
} from "../../test_utils";
import { createFullNode } from "../create_waku";
import {
generatePrivateKey,
generateSymmetricKey,
getPublicKey,
} from "../crypto";
import type { Message, WakuFull } from "../interfaces";
import { bytesToUtf8, utf8ToBytes } from "../utils";
import { waitForRemotePeer } from "../wait_for_remote_peer";
import { Protocols } from "../waku";
import { DecoderV0, EncoderV0 } from "../waku_message/version_0.js";
import {
AsymDecoder,

View File

@ -18,7 +18,7 @@ export interface PointToPointProtocol {
}
export type ProtocolOptions = {
pubsubTopic?: string;
pubSubTopic?: string;
/**
* Optionally specify an PeerId for the protocol request. If not included, will use a random peer.
*/