mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 10:21:52 +01:00
Merge pull request #910 from mempool/simon/liquid-fee-ranges
Display lower <1 s/vB fee rate tiers for Liquid
This commit is contained in:
commit
6ad4e655ea
@ -3,6 +3,7 @@ import { DB } from '../database';
|
||||
import logger from '../logger';
|
||||
|
||||
import { Statistic, TransactionExtended, OptimizedStatistic } from '../mempool.interfaces';
|
||||
import config from '../config';
|
||||
|
||||
class Statistics {
|
||||
protected intervalTimer: NodeJS.Timer | undefined;
|
||||
@ -87,7 +88,15 @@ class Statistics {
|
||||
|
||||
memPoolArray.forEach((transaction) => {
|
||||
for (let i = 0; i < logFees.length; i++) {
|
||||
if ((logFees[i] === 2000 && transaction.effectiveFeePerVsize >= 2000) || transaction.effectiveFeePerVsize <= logFees[i]) {
|
||||
if (
|
||||
(config.MEMPOOL.NETWORK === 'liquid'
|
||||
&& ((logFees[i] === 2000 && transaction.effectiveFeePerVsize * 10 >= 2000)
|
||||
|| transaction.effectiveFeePerVsize * 10 <= logFees[i]))
|
||||
||
|
||||
(config.MEMPOOL.NETWORK !== 'liquid'
|
||||
&& ((logFees[i] === 2000 && transaction.effectiveFeePerVsize >= 2000)
|
||||
|| transaction.effectiveFeePerVsize <= logFees[i]))
|
||||
) {
|
||||
if (weightVsizeFees[logFees[i]]) {
|
||||
weightVsizeFees[logFees[i]] += transaction.vsize;
|
||||
} else {
|
||||
|
@ -352,9 +352,17 @@ export class MempoolGraphComponent implements OnInit, OnChanges {
|
||||
}
|
||||
if (feeLevels[i] <= this.limitFee) {
|
||||
if (i === 0) {
|
||||
this.feeLevelsOrdered.push('0 - 1');
|
||||
if (this.stateService.network === 'liquid') {
|
||||
this.feeLevelsOrdered.push('0 - 0.1');
|
||||
} else {
|
||||
this.feeLevelsOrdered.push('0 - 1');
|
||||
}
|
||||
} else {
|
||||
this.feeLevelsOrdered.push(`${feeLevels[i - 1]} - ${feeLevels[i]}`);
|
||||
if (this.stateService.network === 'liquid') {
|
||||
this.feeLevelsOrdered.push(`${feeLevels[i - 1] / 10} - ${feeLevels[i] / 10}`);
|
||||
} else {
|
||||
this.feeLevelsOrdered.push(`${feeLevels[i - 1]} - ${feeLevels[i]}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user