diff --git a/backend/.gitignore b/backend/.gitignore
index 5476d633c..67fb162c6 100644
--- a/backend/.gitignore
+++ b/backend/.gitignore
@@ -1,9 +1,9 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# production config and external assets
-*.json
-!mempool-config.sample.json
+mempool-config.json
+pools.json
icons.json
# compiled output
diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts
index 30f9fbf78..e40977c6c 100644
--- a/backend/src/api/blocks.ts
+++ b/backend/src/api/blocks.ts
@@ -578,7 +578,7 @@ class Blocks {
// Index the response if needed
if (Common.blocksSummariesIndexingEnabled() === true) {
- await BlocksSummariesRepository.$saveSummary(block.height, summary, null);
+ await BlocksSummariesRepository.$saveSummary({height: block.height, mined: summary});
}
return summary.transactions;
diff --git a/backend/src/api/websocket-handler.ts b/backend/src/api/websocket-handler.ts
index dee44ba63..4896ee058 100644
--- a/backend/src/api/websocket-handler.ts
+++ b/backend/src/api/websocket-handler.ts
@@ -451,9 +451,12 @@ class WebsocketHandler {
value: tx.value,
};
});
- BlocksSummariesRepository.$saveSummary(block.height, null, {
- id: block.id,
- transactions: stripped
+ BlocksSummariesRepository.$saveSummary({
+ height: block.height,
+ template: {
+ id: block.id,
+ transactions: stripped
+ }
});
BlocksAuditsRepository.$saveAudit({
diff --git a/backend/src/repositories/BlocksSummariesRepository.ts b/backend/src/repositories/BlocksSummariesRepository.ts
index 2f47f7a35..28b3cc7eb 100644
--- a/backend/src/repositories/BlocksSummariesRepository.ts
+++ b/backend/src/repositories/BlocksSummariesRepository.ts
@@ -17,18 +17,18 @@ class BlocksSummariesRepository {
return undefined;
}
- public async $saveSummary(height: number, mined: BlockSummary | null = null, template: BlockSummary | null = null) {
- const blockId = mined?.id ?? template?.id;
+ public async $saveSummary(params: { height: number, mined?: BlockSummary, template?: BlockSummary}) {
+ const blockId = params.mined?.id ?? params.template?.id;
try {
const [dbSummary]: any[] = await DB.query(`SELECT * FROM blocks_summaries WHERE id = "${blockId}"`);
if (dbSummary.length === 0) { // First insertion
await DB.query(`INSERT INTO blocks_summaries VALUE (?, ?, ?, ?)`, [
- height, blockId, JSON.stringify(mined?.transactions ?? []), JSON.stringify(template?.transactions ?? [])
+ params.height, blockId, JSON.stringify(params.mined?.transactions ?? []), JSON.stringify(params.template?.transactions ?? [])
]);
- } else if (mined !== null) { // Update mined block summary
- await DB.query(`UPDATE blocks_summaries SET transactions = ? WHERE id = "${mined.id}"`, [JSON.stringify(mined?.transactions)]);
- } else if (template !== null) { // Update template block summary
- await DB.query(`UPDATE blocks_summaries SET template = ? WHERE id = "${template.id}"`, [JSON.stringify(template?.transactions)]);
+ } else if (params.mined !== undefined) { // Update mined block summary
+ await DB.query(`UPDATE blocks_summaries SET transactions = ? WHERE id = "${params.mined.id}"`, [JSON.stringify(params.mined.transactions)]);
+ } else if (params.template !== undefined) { // Update template block summary
+ await DB.query(`UPDATE blocks_summaries SET template = ? WHERE id = "${params.template.id}"`, [JSON.stringify(params.template?.transactions)]);
}
} catch (e: any) {
if (e.errno === 1062) { // ER_DUP_ENTRY - This scenario is possible upon node backend restart
diff --git a/frontend/src/app/components/block-overview-graph/tx-view.ts b/frontend/src/app/components/block-overview-graph/tx-view.ts
index edcbf2f58..c0b980d5c 100644
--- a/frontend/src/app/components/block-overview-graph/tx-view.ts
+++ b/frontend/src/app/components/block-overview-graph/tx-view.ts
@@ -143,9 +143,7 @@ export default class TxView implements TransactionStripped {
getColor(): Color {
// Block audit
- if (this.status === 'found') {
- // return hexToColor('1a4987');
- } else if (this.status === 'missing') {
+ if (this.status === 'missing') {
return hexToColor('039BE5');
} else if (this.status === 'added') {
return hexToColor('D81B60');
diff --git a/frontend/src/app/components/block-prediction-graph/block-prediction-graph.component.ts b/frontend/src/app/components/block-prediction-graph/block-prediction-graph.component.ts
index c708c7574..e88dc07be 100644
--- a/frontend/src/app/components/block-prediction-graph/block-prediction-graph.component.ts
+++ b/frontend/src/app/components/block-prediction-graph/block-prediction-graph.component.ts
@@ -156,7 +156,7 @@ export class BlockPredictionGraphComponent implements OnInit {
type: 'category',
axisLine: { onZero: true },
axisLabel: {
- formatter: val => formatterXAxisTimeCategory(this.locale, this.timespan, parseInt(val, 10)),
+ formatter: val => formatterXAxisTimeCategory(this.locale, this.timespan, parseInt(val, 10) * 1000),
align: 'center',
fontSize: 11,
lineHeight: 12,
diff --git a/frontend/src/app/components/tx-features/tx-features.component.html b/frontend/src/app/components/tx-features/tx-features.component.html
index 46856a7c7..b5463185e 100644
--- a/frontend/src/app/components/tx-features/tx-features.component.html
+++ b/frontend/src/app/components/tx-features/tx-features.component.html
@@ -5,6 +5,9 @@
SegWit
-Taproot
+Taproot
+
+ Taproot
+
RBF
RBF