feat: @snort/system CacheRelay
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { removeUndefined, throwIfOffline } from "@snort/shared";
|
||||
import { mapEventToProfile, NostrEvent, NostrSystem, ProfileLoaderService, socialGraphInstance } from "@snort/system";
|
||||
import { mapEventToProfile, NostrEvent, NostrSystem, socialGraphInstance } from "@snort/system";
|
||||
import inMemoryDB from "@snort/system/src/InMemoryDB";
|
||||
|
||||
import { EventsCache, Relay, RelayMetrics, SystemDb, UserCache, UserRelays } from "@/Cache";
|
||||
@ -15,6 +15,7 @@ export const System = new NostrSystem({
|
||||
eventsCache: EventsCache,
|
||||
profileCache: UserCache,
|
||||
relayMetrics: RelayMetrics,
|
||||
cacheRelay: Relay,
|
||||
optimizer: hasWasm ? WasmOptimizer : undefined,
|
||||
db: SystemDb,
|
||||
});
|
||||
@ -58,9 +59,4 @@ export async function fetchProfile(key: string) {
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Singleton user profile loader
|
||||
*/
|
||||
export const ProfileLoader = new ProfileLoaderService(System, UserCache);
|
||||
}
|
Reference in New Issue
Block a user