From 2ff930ef3e4c8ce0792e7eaaf788b9a4bd1c5cd9 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 21 Feb 2023 22:01:30 -0600 Subject: [PATCH 01/20] Ignore coinbase tx in block health calculation --- backend/src/api/audit.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/api/audit.ts b/backend/src/api/audit.ts index b6b36dbdc..5b67dc965 100644 --- a/backend/src/api/audit.ts +++ b/backend/src/api/audit.ts @@ -119,7 +119,8 @@ class Audit { } const numCensored = Object.keys(isCensored).length; - const score = matches.length > 0 ? (matches.length / (matches.length + numCensored)) : 0; + const numMatches = matches.length - 1; // adjust for coinbase tx + const score = numMatches > 0 ? (numMatches / (numMatches + numCensored)) : 0; return { censored: Object.keys(isCensored), From 8df247626638347d65d83c34739acebaa738fdfc Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Sat, 25 Feb 2023 13:38:09 +0900 Subject: [PATCH 02/20] Improve error handling on channel component --- .../lightning/channel/channel.component.html | 47 +++++++++---------- .../lightning/channel/channel.component.ts | 4 +- .../app/lightning/node/node.component.html | 23 +++++---- 3 files changed, 39 insertions(+), 35 deletions(-) diff --git a/frontend/src/app/lightning/channel/channel.component.html b/frontend/src/app/lightning/channel/channel.component.html index f52b85762..96af4ab67 100644 --- a/frontend/src/app/lightning/channel/channel.component.html +++ b/frontend/src/app/lightning/channel/channel.component.html @@ -1,25 +1,32 @@
-
Lightning channel
-
-

{{ channel.short_id }}

- - {{ channel.id }} - - -
-
- Inactive - Active - Closed - -
+ + +
Lightning channel
+
+

{{ channel.short_id }}

+ + {{ channel.id }} + + +
+
+ Inactive + Active + Closed + +
+
+
+ No channel found for short id "{{ channel.short_id }}" +
+ -
+
@@ -65,7 +72,7 @@
-
+
@@ -104,14 +111,6 @@
- -
- Error loading data. -

- {{ error.status }}: {{ error.error }} -
-
-
Lightning channel
diff --git a/frontend/src/app/lightning/channel/channel.component.ts b/frontend/src/app/lightning/channel/channel.component.ts index 379e8a005..d57aa3f01 100644 --- a/frontend/src/app/lightning/channel/channel.component.ts +++ b/frontend/src/app/lightning/channel/channel.component.ts @@ -38,7 +38,9 @@ export class ChannelComponent implements OnInit { }), catchError((err) => { this.error = err; - return of(null); + return [{ + short_id: params.get('short_id') + }]; }) ); }), diff --git a/frontend/src/app/lightning/node/node.component.html b/frontend/src/app/lightning/node/node.component.html index 575614c10..1519eb1da 100644 --- a/frontend/src/app/lightning/node/node.component.html +++ b/frontend/src/app/lightning/node/node.component.html @@ -1,15 +1,18 @@
-
Lightning node
-
-

{{ node.alias }}

- - - - - + + +
Lightning node
+
+

{{ node.alias }}

+ + + + + + - -
+
+
From 9a246c68de699675d3ddead751ef8d5c23d1ae57 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Sat, 25 Feb 2023 13:43:48 +0900 Subject: [PATCH 03/20] Center wrapping error message on mobile --- frontend/src/app/lightning/channel/channel.component.html | 2 +- frontend/src/app/lightning/node/node.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/lightning/channel/channel.component.html b/frontend/src/app/lightning/channel/channel.component.html index 96af4ab67..951cb8090 100644 --- a/frontend/src/app/lightning/channel/channel.component.html +++ b/frontend/src/app/lightning/channel/channel.component.html @@ -20,7 +20,7 @@
- No channel found for short id "{{ channel.short_id }}" + No channel found for short id "{{ channel.short_id }}"
- No node found for public key "{{ node.public_key | shortenString : 12}}" + No node found for public key "{{ node.public_key | shortenString : 12}}"
From 333aef5e94ce66360e2d6066b8e5de2eb2d33d74 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Sat, 25 Feb 2023 04:23:45 -0500 Subject: [PATCH 04/20] Update legal notices for 2023 --- LICENSE | 2 +- frontend/src/app/components/about/about.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 966417847..ac267d120 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ The Mempool Open Source Project -Copyright (c) 2019-2022 The Mempool Open Source Project Developers +Copyright (c) 2019-2023 The Mempool Open Source Project Developers This program is free software; you can redistribute it and/or modify it under the terms of (at your option) either: diff --git a/frontend/src/app/components/about/about.component.html b/frontend/src/app/components/about/about.component.html index 876bec028..03323b6ed 100644 --- a/frontend/src/app/components/about/about.component.html +++ b/frontend/src/app/components/about/about.component.html @@ -352,7 +352,7 @@