mirror of https://github.com/status-im/js-waku.git
fix: go-waku interop tests (#1378)
* fix interop for filter v1 * change to better desc
This commit is contained in:
parent
6e2d1d674a
commit
b2caf10d03
|
@ -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 {
|
||||
|
|
|
@ -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 = "";
|
||||
|
|
|
@ -90,6 +90,7 @@ describe("ENR Interop: NimGoNode", function () {
|
|||
store: true,
|
||||
filter: true,
|
||||
lightpush: true,
|
||||
legacyFilter: true,
|
||||
});
|
||||
const multiAddrWithId = await nwaku.getMultiaddrWithId();
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue