Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ty-everett committed Feb 22, 2025
1 parent 2b2ccc4 commit 4ab4946
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/overlay-tools/SHIPBroadcaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ const MAX_SHIP_QUERY_TIMEOUT = 1000
export class HTTPSOverlayBroadcastFacilitator implements OverlayBroadcastFacilitator {
httpClient: typeof fetch

constructor(httpClient = fetch) {
constructor (httpClient = fetch) {
this.httpClient = httpClient
}

async send(url: string, taggedBEEF: TaggedBEEF): Promise<STEAK> {
async send (url: string, taggedBEEF: TaggedBEEF): Promise<STEAK> {
if (!url.startsWith('https:')) {
throw new Error(
'HTTPS facilitator can only use URLs that start with "https:"'
Expand Down Expand Up @@ -115,7 +115,7 @@ export default class SHIPBroadcaster implements Broadcaster {
* @param {string[]} topics - The list of SHIP topic names where transactions are to be sent.
* @param {SHIPBroadcasterConfig} config - Configuration options for the SHIP broadcaster.
*/
constructor(topics: string[], config?: SHIPBroadcasterConfig) {
constructor (topics: string[], config?: SHIPBroadcasterConfig) {
if (topics.length === 0) {
throw new Error('At least one topic is required for broadcast.')
}
Expand Down Expand Up @@ -146,7 +146,7 @@ export default class SHIPBroadcaster implements Broadcaster {
* @param {Transaction} tx - The transaction to be sent.
* @returns {Promise<BroadcastResponse | BroadcastFailure>} A promise that resolves to either a success or failure response.
*/
async broadcast(
async broadcast (
tx: Transaction
): Promise<BroadcastResponse | BroadcastFailure> {
let beef: number[]
Expand Down Expand Up @@ -318,7 +318,7 @@ export default class SHIPBroadcaster implements Broadcaster {
}
}

private checkAcknowledgmentFromAllHosts(
private checkAcknowledgmentFromAllHosts (
hostAcknowledgments: Record<string, Set<string>>,
requiredTopics: string[],
require: 'all' | 'any'
Expand Down Expand Up @@ -346,7 +346,7 @@ export default class SHIPBroadcaster implements Broadcaster {
return true
}

private checkAcknowledgmentFromAnyHost(
private checkAcknowledgmentFromAnyHost (
hostAcknowledgments: Record<string, Set<string>>,
requiredTopics: string[],
require: 'all' | 'any'
Expand Down Expand Up @@ -379,7 +379,7 @@ export default class SHIPBroadcaster implements Broadcaster {
}
}

private checkAcknowledgmentFromSpecificHosts(
private checkAcknowledgmentFromSpecificHosts (
hostAcknowledgments: Record<string, Set<string>>,
requirements: Record<string, 'all' | 'any' | string[]>
): boolean {
Expand Down Expand Up @@ -431,7 +431,7 @@ export default class SHIPBroadcaster implements Broadcaster {
*
* @returns A mapping of URLs for hosts interested in this transaction. Keys are URLs, values are which of our topics the specific host cares about.
*/
private async findInterestedHosts(): Promise<Record<string, Set<string>>> {
private async findInterestedHosts (): Promise<Record<string, Set<string>>> {
// TODO: cache the list of interested hosts to avoid spamming SHIP trackers.
// TODO: Monetize the operation of the SHIP tracker system.
// TODO: Cache ship/slap lookup with expiry (every 5min)
Expand Down

0 comments on commit 4ab4946

Please sign in to comment.