use accelerated rates for block templates & show in viz

This commit is contained in:
Mononaut
2023-05-26 21:10:32 -04:00
parent e489f713eb
commit aa24f6a84d
18 changed files with 75 additions and 17 deletions

View File

@@ -21,6 +21,7 @@ import Audit from './audit';
import { deepClone } from '../utils/clone';
import priceUpdater from '../tasks/price-updater';
import { ApiPrice } from '../repositories/PricesRepository';
import mempool from './mempool';
// valid 'want' subscriptions
const wantable = [
@@ -666,7 +667,7 @@ class WebsocketHandler {
}
if (Common.indexingEnabled()) {
const { censored, added, fresh, sigop, fullrbf, accelerated, score, similarity } = Audit.auditBlock(transactions, projectedBlocks, auditMempool, accelerations);
const { censored, added, fresh, sigop, fullrbf, accelerated, score, similarity } = Audit.auditBlock(transactions, projectedBlocks, auditMempool);
const matchRate = Math.round(score * 100 * 100) / 100;
const stripped = projectedBlocks[0]?.transactions ? projectedBlocks[0].transactions : [];
@@ -737,6 +738,8 @@ class WebsocketHandler {
const fees = feeApi.getRecommendedFee();
const mempoolInfo = memPool.getMempoolInfo();
memPool.removeAccelerations(txIds);
// update init data
this.updateSocketDataFields({
'mempoolInfo': mempoolInfo,