mirror of
https://github.com/mempool/mempool.git
synced 2026-08-13 12:33:11 +02:00
Merge branch 'master' into jramos/empty-block-bug
This commit is contained in:
commit
a1022cbb53
5 changed files with 29 additions and 1 deletions
|
|
@ -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<void> {
|
||||
const start = Date.now();
|
||||
|
|
|
|||
|
|
@ -711,6 +711,11 @@
|
|||
<img src="/resources/profile/bdk.svg" />
|
||||
</div>
|
||||
</a>
|
||||
<a target="_blank" class="d-block col-12 col-md-6 col-lg-4" href="https://stratumprotocol.org/" title="Stratum V2">
|
||||
<div class="p-2 alliance-logo">
|
||||
<img class="stratum-v2-logo" src="/resources/profile/stratum-v2.png" />
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
BIN
frontend/src/resources/profile/stratum-v2.png
Normal file
BIN
frontend/src/resources/profile/stratum-v2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue