Dont compute fee percentile / median fee when indexing is disabled because we need summaries
This commit is contained in:
parent
6965c8f41b
commit
eceedf0bdf
@ -207,9 +207,11 @@ class Blocks {
|
|||||||
|
|
||||||
blk.extras.blockTime = 0; // TODO
|
blk.extras.blockTime = 0; // TODO
|
||||||
|
|
||||||
blk.extras.feePercentiles = await BlocksSummariesRepository.$getFeePercentilesByBlockId(block.id);
|
if (Common.indexingEnabled()) {
|
||||||
if (blk.extras.feePercentiles !== null) {
|
blk.extras.feePercentiles = await BlocksSummariesRepository.$getFeePercentilesByBlockId(block.id);
|
||||||
blk.extras.medianFeeAmt = blk.extras.feePercentiles[3];
|
if (blk.extras.feePercentiles !== null) {
|
||||||
|
blk.extras.medianFeeAmt = blk.extras.feePercentiles[3];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
blk.extras.virtualSize = block.weight / 4.0;
|
blk.extras.virtualSize = block.weight / 4.0;
|
||||||
|
@ -24,7 +24,8 @@ import { FieldPacket, OkPacket, PoolOptions, ResultSetHeader, RowDataPacket } fr
|
|||||||
|
|
||||||
private checkDBFlag() {
|
private checkDBFlag() {
|
||||||
if (config.DATABASE.ENABLED === false) {
|
if (config.DATABASE.ENABLED === false) {
|
||||||
logger.err('Trying to use DB feature but config.DATABASE.ENABLED is set to false, please open an issue');
|
const stack = new Error().stack;
|
||||||
|
logger.err(`Trying to use DB feature but config.DATABASE.ENABLED is set to false, please open an issue.\nStack trace: ${stack}}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user