fix: go-waku interop tests (#1378)

* fix interop for filter v1

* change to better desc
This commit is contained in:
Danish Arora 2023-05-23 23:45:08 +05:30 committed by GitHub
parent 6e2d1d674a
commit b2caf10d03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 4 deletions

View File

@ -22,6 +22,8 @@ export interface Args {
websocketPort?: number;
discv5BootstrapNode?: string;
discv5UdpPort?: number;
// `legacyFilter` is required to enable filter v1 with go-waku
legacyFilter?: boolean;
}
export enum LogLevel {

View File

@ -122,6 +122,9 @@ export class NimGoNode {
this.rpcPort = rpcPort;
this.websocketPort = websocketPort;
// `legacyFilter` is required to enable filter v1 with go-waku
const { legacyFilter = false, ..._args } = args;
// Object.assign overrides the properties with the source (if there are conflicts)
Object.assign(
mergedArgs,
@ -130,10 +133,10 @@ export class NimGoNode {
tcpPort,
websocketPort,
...(args?.peerExchange && { discv5UdpPort }),
...(isGoWaku && { minRelayPeersToPublish: 0 }),
...(isGoWaku && { minRelayPeersToPublish: 0, legacyFilter }),
},
{ rpcAddress: "0.0.0.0" },
args
_args
);
process.env.WAKUNODE2_STORE_MESSAGE_DB_URL = "";

View File

@ -90,6 +90,7 @@ describe("ENR Interop: NimGoNode", function () {
store: true,
filter: true,
lightpush: true,
legacyFilter: true,
});
const multiAddrWithId = await nwaku.getMultiaddrWithId();

View File

@ -36,7 +36,12 @@ describe("Waku Filter: V1", () => {
beforeEach(async function () {
this.timeout(15000);
nwaku = new NimGoNode(makeLogFileName(this));
await nwaku.start({ filter: true, lightpush: true, relay: true });
await nwaku.start({
filter: true,
lightpush: true,
relay: true,
legacyFilter: true,
});
waku = await createLightNode({
useFilterV1: true,
staticNoiseKey: NOISE_KEY_1,

View File

@ -27,7 +27,12 @@ describe("Util: toAsyncIterator: FilterV1", () => {
beforeEach(async function () {
this.timeout(15000);
nwaku = new NimGoNode(makeLogFileName(this));
await nwaku.start({ filter: true, lightpush: true, relay: true });
await nwaku.start({
filter: true,
lightpush: true,
relay: true,
legacyFilter: true,
});
waku = await createLightNode({
useFilterV1: true,
staticNoiseKey: NOISE_KEY_1,