Skip to content
Snippets Groups Projects
Commit 23a8d899 authored by Éloïs's avatar Éloïs
Browse files

Merge branch '1409-deprecated-and-now-unused-method-lastblockwithdividend' into dev

parents 097a1381 be08c404
Branches
Tags
1 merge request!1308Resolve "Deprecated and now unused method lastBlockWithDividend()"
...@@ -15,8 +15,6 @@ export interface BlockchainDAO extends GenericDAO<DBBlock>, ForksDAO { ...@@ -15,8 +15,6 @@ export interface BlockchainDAO extends GenericDAO<DBBlock>, ForksDAO {
lastBlockOfIssuer(issuer: string): Promise<DBBlock | null>; lastBlockOfIssuer(issuer: string): Promise<DBBlock | null>;
lastBlockWithDividend(): Promise<DBBlock | null>;
getCountOfBlocksIssuedBy(issuer: string): Promise<number>; getCountOfBlocksIssuedBy(issuer: string): Promise<number>;
dropNonForkBlocksAbove(number: number): Promise<void>; dropNonForkBlocksAbove(number: number): Promise<void>;
......
...@@ -245,17 +245,6 @@ export class LevelDBBlockchain extends LevelDBTable<DBBlock> ...@@ -245,17 +245,6 @@ export class LevelDBBlockchain extends LevelDBTable<DBBlock>
return theLast; 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> { async removeBlock(blockstamp: string): Promise<void> {
await this.del(LevelDBBlockchain.trimKey(parseInt(blockstamp))); await this.del(LevelDBBlockchain.trimKey(parseInt(blockstamp)));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment