diff --git a/app/lib/dal/indexDAL/abstract/BlockchainDAO.ts b/app/lib/dal/indexDAL/abstract/BlockchainDAO.ts index cbc15a3ffb2fa43f576dd82772d6bfc2d906ff7f..def236f36554acb1eccf463276540e7d97291885 100644 --- a/app/lib/dal/indexDAL/abstract/BlockchainDAO.ts +++ b/app/lib/dal/indexDAL/abstract/BlockchainDAO.ts @@ -15,8 +15,6 @@ export interface BlockchainDAO extends GenericDAO<DBBlock>, ForksDAO { lastBlockOfIssuer(issuer: string): Promise<DBBlock | null>; - lastBlockWithDividend(): Promise<DBBlock | null>; - getCountOfBlocksIssuedBy(issuer: string): Promise<number>; dropNonForkBlocksAbove(number: number): Promise<void>; diff --git a/app/lib/dal/indexDAL/leveldb/LevelDBBlockchain.ts b/app/lib/dal/indexDAL/leveldb/LevelDBBlockchain.ts index ffcefc1478acf1ac02caaf584798bf725819dfe3..03a9dc5e6b4e53e20e4ebdb42326d32fccd0e7fa 100644 --- a/app/lib/dal/indexDAL/leveldb/LevelDBBlockchain.ts +++ b/app/lib/dal/indexDAL/leveldb/LevelDBBlockchain.ts @@ -245,17 +245,6 @@ export class LevelDBBlockchain extends LevelDBTable<DBBlock> return theLast; } - // TODO: Unused? potentially costly because of full scan - async lastBlockWithDividend(): Promise<DBBlock | null> { - let theLast: DBBlock | null = null; - await this.readAllKeyValue((kv) => { - if (!theLast && kv.value.dividend) { - theLast = kv.value; - } - }); - return theLast; - } - async removeBlock(blockstamp: string): Promise<void> { await this.del(LevelDBBlockchain.trimKey(parseInt(blockstamp))); }