Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #578 from godwokenrises/less-db-cache
Browse files Browse the repository at this point in the history
chore: rm tip block cache to improve ci speed
  • Loading branch information
RetricSu authored Nov 22, 2022
2 parents 7a36dd0 + 9d93300 commit 8a5e64f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/api-server/src/db/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,15 @@ export class Query {
const blockData = await this.knex<DBBlock>("blocks")
.select("number")
.orderBy("number", "desc")
.first()
.cache();
.first();

return toBigIntOpt(blockData?.number);
}

async getTipBlock(): Promise<Block | undefined> {
const block = await this.knex<DBBlock>("blocks")
.orderBy("number", "desc")
.first()
.cache();
.first();

if (!block) {
return undefined;
Expand Down

0 comments on commit 8a5e64f

Please sign in to comment.