*add maxRelays network option

This commit is contained in:
Derrick Hammer 2022-09-22 09:34:07 -04:00
parent a226c7deea
commit fa8910a4fd
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 10 additions and 0 deletions

View File

@ -71,6 +71,16 @@ export default class RpcNetwork {
this._bypassCache = value; this._bypassCache = value;
} }
private _maxRelays: number = 0;
get maxRelays(): number {
return this._maxRelays;
}
set maxRelays(value: number) {
this._maxRelays = value;
}
public addRelay(pubkey: string): void { public addRelay(pubkey: string): void {
this._relays.push(pubkey); this._relays.push(pubkey);
this._relays = [...new Set(this._relays)]; this._relays = [...new Set(this._relays)];