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

chore: rm tip block cache to improve ci speed #578

Merged
merged 1 commit into from
Nov 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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