Mise à jour de GitLab prévue ce samedi 23 octobre 2021 à partir de 9h00 CET

Commit bec3d7c6 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] `dump` was broken for block#0 members

parent a969e5c6
......@@ -357,7 +357,12 @@ export class FileDAL {
}
async getAbsoluteBlockByNumberAndHash(number:number, hash:string): Promise<DBBlock|null> {
return (await this.blockDAL.getAbsoluteBlock(number, hash)) || (await this.blockchainArchiveDAL.getBlock(number, hash))
if (number > 0) {
return (await this.blockDAL.getAbsoluteBlock(number, hash)) || (await this.blockchainArchiveDAL.getBlock(number, hash))
} else {
// Block#0 is special
return (await this.blockDAL.getBlock(number)) || (await this.blockchainArchiveDAL.getBlockByNumber(number))
}
}
async getAbsoluteBlockByBlockstamp(blockstamp: string): Promise<DBBlock|null> {
......@@ -1072,9 +1077,9 @@ export class FileDAL {
await this.iindexDAL.trimRecords(maxNumber)
await this.mindexDAL.trimRecords(maxNumber)
await this.cindexDAL.trimExpiredCerts(maxNumber)
await this.sindexDAL.trimConsumedSource(maxNumber)
await this.dividendDAL.trimConsumedUDs(maxNumber)
}
await this.sindexDAL.trimConsumedSource(maxNumber)
await this.dividendDAL.trimConsumedUDs(maxNumber)
}
async trimSandboxes(block:{ medianTime: number }) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment