diff --git a/backend/src/index.ts b/backend/src/index.ts index e857a377b..04690c4bc 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -1,5 +1,6 @@ import express from 'express'; import { Application, Request, Response, NextFunction } from 'express'; +import * as fs from 'fs'; import * as http from 'http'; import * as WebSocket from 'ws'; import bitcoinApi from './api/bitcoin/bitcoin-api-factory'; @@ -67,6 +68,10 @@ class Server { constructor() { this.app = express(); + if (cluster.isPrimary && config.MEMPOOL.UNIX_SOCKET_PATH) { + this.clearStaleUnixSocket(config.MEMPOOL.UNIX_SOCKET_PATH); + } + if (!config.MEMPOOL.SPAWN_CLUSTER_PROCS) { void this.startServer(); return; @@ -249,6 +254,17 @@ class Server { void poolsUpdater.$startService(); } + clearStaleUnixSocket(path: string): void { + try { + if (fs.existsSync(path)) { + fs.unlinkSync(path); + logger.notice(`Removed stale unix socket ${path}`); + } + } catch (e) { + logger.err(`Failed to remove stale unix socket ${path}. Reason: ${e instanceof Error ? e.message : e}`); + } + } + /** @asyncSafe */ async runMainUpdateLoop(): Promise { const start = Date.now(); diff --git a/frontend/src/app/components/about/about.component.html b/frontend/src/app/components/about/about.component.html index acc85d65b..1012d6823 100644 --- a/frontend/src/app/components/about/about.component.html +++ b/frontend/src/app/components/about/about.component.html @@ -711,6 +711,11 @@ + + + diff --git a/frontend/src/app/components/about/about.component.scss b/frontend/src/app/components/about/about.component.scss index 28aeda160..471cf828d 100644 --- a/frontend/src/app/components/about/about.component.scss +++ b/frontend/src/app/components/about/about.component.scss @@ -104,6 +104,7 @@ .alliances-logos { align-items: center; margin-bottom: 80px; + justify-content: center; } .alliance-logo { height: 80px; @@ -114,6 +115,12 @@ margin-top: 45px; } } + .stratum-v2-logo { + object-fit: contain; + @media (max-width: 767px) { + width: 300px; + } + } .copa { @media (min-width: 992px) { position: relative; diff --git a/frontend/src/resources/profile/stratum-v2.png b/frontend/src/resources/profile/stratum-v2.png new file mode 100644 index 000000000..b792f8af7 Binary files /dev/null and b/frontend/src/resources/profile/stratum-v2.png differ diff --git a/production/nginx/server-common.conf b/production/nginx/server-common.conf index c5af76fc3..0737f2718 100644 --- a/production/nginx/server-common.conf +++ b/production/nginx/server-common.conf @@ -217,7 +217,7 @@ location @mempool-space-ssr { proxy_cache_background_update on; proxy_cache_use_stale updating; proxy_cache unfurler; - proxy_cache_valid 200 301 302 5m; # will re-render page if older than this + proxy_cache_valid 200 5m; # will re-render page if older than this proxy_redirect off; expires 5m;