Skip to content
Snippets Groups Projects
Commit 41c20c9c authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] #1409: expensive method no more used by duniter-ui

parent 097a1381
No related branches found
No related tags found
1 merge request!1308Resolve "Deprecated and now unused method lastBlockWithDividend()"
...@@ -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.
Finish editing this message first!
Please register or to comment