Skip to content

Commit 25babcd

Browse files
committed
Fix: renaming entity classes
1 parent 18a9144 commit 25babcd

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

src/config/configuration.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {
66
DBTransactionOutput,
77
DBUtxoIndexerBlock,
88
DBUtxoTransaction,
9-
IndexerVersionState,
10-
PruneSyncState,
11-
TipSyncState,
9+
DBIndexerVersion,
10+
DBPruneSyncState,
11+
DBTipSyncState,
1212
} from '../entity/utxo-entity-definitions';
1313
import {
1414
DBXrpIndexerBlock,
@@ -142,9 +142,9 @@ function getDatabaseEntities(verifierType: ChainType) {
142142
DBTransactionInput,
143143
DBTransactionInputCoinbase,
144144
DBTransactionOutput,
145-
TipSyncState,
146-
PruneSyncState,
147-
IndexerVersionState,
145+
DBTipSyncState,
146+
DBPruneSyncState,
147+
DBIndexerVersion,
148148
];
149149
case ChainType.XRP:
150150
return [

src/entity/utxo-entity-definitions.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export class DBTransactionInput extends AbstractTransactionOutput {
317317
}
318318

319319
@Entity('utxo_indexer_tipsyncstate')
320-
export class TipSyncState {
320+
export class DBTipSyncState {
321321
@PrimaryColumn({ type: 'bigint' })
322322
id: string;
323323

@@ -336,10 +336,10 @@ export class TipSyncState {
336336
// TODO: add sync state variables such as confirmation height, etc.
337337
}
338338

339-
export type ITipSyncState = new () => TipSyncState;
339+
export type IDBTipSyncState = new () => DBTipSyncState;
340340

341341
@Entity('utxo_indexer_prunesyncstate')
342-
export class PruneSyncState {
342+
export class DBPruneSyncState {
343343
@PrimaryColumn({ type: 'bigint' })
344344
id: string;
345345

@@ -350,11 +350,11 @@ export class PruneSyncState {
350350
timestamp: number;
351351
}
352352

353-
export type IPruneSyncState = new () => PruneSyncState;
353+
export type IDBPruneSyncState = new () => DBPruneSyncState;
354354

355355

356356
@Entity('utxo_indexer_version')
357-
export class IndexerVersionState {
357+
export class DBIndexerVersion {
358358
@PrimaryColumn({ type: 'bigint' })
359359
id: string;
360360

@@ -388,4 +388,4 @@ export class IndexerVersionState {
388388
}
389389
}
390390

391-
export type IIndexerVersionState = new () => IndexerVersionState;
391+
export type IDBIndexerVersion = new () => DBIndexerVersion;

src/indexed-query-manager/UtxoIndexQueryManager.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {
33
DBUtxoTransaction,
44
IDBUtxoIndexerBlock,
55
IDBUtxoTransaction,
6-
ITipSyncState,
7-
TipSyncState,
6+
IDBTipSyncState,
7+
DBTipSyncState,
88
} from '../entity/utxo-entity-definitions';
99
import { IIndexedQueryManager } from './IIndexedQueryManager';
1010
import {
@@ -31,14 +31,14 @@ abstract class UtxoIndexedQueryManager extends IIndexedQueryManager {
3131
// Block table entity
3232
private transactionTable: IDBUtxoTransaction;
3333
private blockTable: IDBUtxoIndexerBlock;
34-
private tipState: ITipSyncState;
34+
private tipState: IDBTipSyncState;
3535

3636
protected abstract chainType: ChainType;
3737

3838
constructor(options: IndexedQueryManagerOptions) {
3939
super(options);
4040
this.blockTable = DBUtxoIndexerBlock;
41-
this.tipState = TipSyncState;
41+
this.tipState = DBTipSyncState;
4242
this.transactionTable = DBUtxoTransaction;
4343
}
4444

@@ -50,7 +50,7 @@ abstract class UtxoIndexedQueryManager extends IIndexedQueryManager {
5050
// Last confirmed blocks, tips
5151
////////////////////////////////////////////////////////////
5252

53-
private async _getTipStateObject(): Promise<TipSyncState> {
53+
private async _getTipStateObject(): Promise<DBTipSyncState> {
5454
const res = await this.entityManager.findOne(this.tipState, {});
5555
if (res === undefined || res === null) {
5656
throw new Error('Cant find tip sync state in DB');

src/services/indexer-services/utxo-indexer.service.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ import {
1616
DBUtxoTransaction,
1717
IDBUtxoIndexerBlock,
1818
IDBUtxoTransaction,
19-
IIndexerVersionState,
20-
IndexerVersionState,
21-
IPruneSyncState,
22-
ITipSyncState,
23-
PruneSyncState,
24-
TipSyncState,
19+
IDBIndexerVersion,
20+
DBIndexerVersion,
21+
IDBPruneSyncState,
22+
IDBTipSyncState,
23+
DBPruneSyncState,
24+
DBTipSyncState,
2525
} from '../../entity/utxo-entity-definitions';
2626
import { PaginatedList } from '../../utils/api-models/PaginatedList';
2727
import { IIndexerEngineService } from '../common/base-indexer-engine-service';
@@ -31,9 +31,9 @@ abstract class UtxoExternalIndexerEngineService extends IIndexerEngineService {
3131
// External utxo indexers specific tables
3232
private transactionTable: IDBUtxoTransaction;
3333
private blockTable: IDBUtxoIndexerBlock;
34-
private tipState: ITipSyncState;
35-
private pruneState: IPruneSyncState;
36-
private versionTable: IIndexerVersionState;
34+
private tipState: IDBTipSyncState;
35+
private pruneState: IDBPruneSyncState;
36+
private versionTable: IDBIndexerVersion;
3737

3838
private indexerServerPageLimit: number;
3939

@@ -46,9 +46,9 @@ abstract class UtxoExternalIndexerEngineService extends IIndexerEngineService {
4646
super();
4747
this.blockTable = DBUtxoIndexerBlock;
4848
this.transactionTable = DBUtxoTransaction;
49-
this.tipState = TipSyncState;
50-
this.pruneState = PruneSyncState;
51-
this.versionTable = IndexerVersionState;
49+
this.tipState = DBTipSyncState;
50+
this.pruneState = DBPruneSyncState;
51+
this.versionTable = DBIndexerVersion;
5252
const verifierConfig =
5353
this.configService.get<VerifierServerConfig>('verifierConfig');
5454
this.indexerServerPageLimit = verifierConfig.indexerServerPageLimit;

0 commit comments

Comments
 (0)