Skip to content

Commit

Permalink
chore(core): Let Topology take only a few properties from Network
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstenson committed Jun 17, 2021
1 parent 9adb458 commit e890f34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions packages/core/src/topology/Topology.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export interface TopologyOptions {
*/
// TODO: Gossip about updated peer latencies
export class Topology {
private readonly parent: Network;
private readonly debug: debug.Debugger;

private readonly endpoint: boolean;
Expand Down Expand Up @@ -91,8 +90,7 @@ export class Topology {
* @param options -
* options to apply
*/
public constructor(parent: Network, options: TopologyOptions) {
this.parent = parent;
public constructor(parent: Pick<Network, 'networkName' | 'networkIdBinary'>, options: TopologyOptions) {
this.endpoint = options.endpoint || false;
this.broadcastTimeout = null;

Expand Down
3 changes: 1 addition & 2 deletions packages/core/test/topology/TopologyTester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ export class TopologyTester {
id: generatedId,

topology: new Topology({
networkId: id,
networkIdBinary: generatedId,
debugNamespace: 'test:' + id
networkName: id
}, {})
};

Expand Down

0 comments on commit e890f34

Please sign in to comment.