Skip to content

Commit

Permalink
Add logging for setting and getting sigchains in LocalDbService
Browse files Browse the repository at this point in the history
  • Loading branch information
adrastaea committed Nov 18, 2024
1 parent 8c498f9 commit b034e48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/backend/src/nest/local-db/local-db.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ export class LocalDbService {

public async setSigChain(sigChain: SigChain) {
// TODO: can this be made more efficient by using a prefix instead of loading all sigchains?
this.logger.info('Setting sigchain', sigChain.team.teamName)
const teamName = sigChain.team.teamName
let sigChains = await this.get(LocalDBKeys.SIGCHAINS)
if (!sigChains) {
Expand All @@ -180,6 +181,7 @@ export class LocalDbService {

public async getSigChain(teamName: string): Promise<SigChainBlob | undefined> {
const sigChains = await this.get(LocalDBKeys.SIGCHAINS)
this.logger.info('Getting sigchain', teamName)
return sigChains?.[teamName]
}
}

0 comments on commit b034e48

Please sign in to comment.