[SSR] allow liquid slippage

This commit is contained in:
Mononaut 2025-12-26 13:14:02 +00:00
parent 92293a7dba
commit 885bf511ff
No known key found for this signature in database
GPG key ID: A3F058E41374C04E
3 changed files with 4 additions and 3 deletions

View file

@ -37,7 +37,7 @@ interface FailoverHost {
class FailoverRouter {
activeHost: FailoverHost;
fallbackHost: FailoverHost;
maxSlippage: number = config.ESPLORA.MAX_BEHIND_TIP ?? 2;
maxSlippage: number = config.ESPLORA.MAX_BEHIND_TIP ?? (Common.isLiquid() ? 8 : 2);
maxHeight: number = 0;
hosts: FailoverHost[];
multihost: boolean;

View file

@ -35,8 +35,8 @@
<td class="rtt only-large">{{ host.rtt | number : '1.0-0' }} {{ host.rtt == null ? '' : 'ms'}} {{ !host.checked ? '⏳' : (host.unreachable ? '🔥' : '✅') }}</td>
<td class="height">{{ host.latestHeight }} {{ !host.checked ? '⏳' : (host.outOfSync ? '🚫' : (host.latestHeight && host.latestHeight < maxHeight ? '🟧' : '')) }}</td>
<ng-container *ngFor="let type of ['hybrid', 'frontend', 'backend', 'electrs', 'ssr', 'core']">
<td class="{{type}} only-large" [style.background-color]="type !== 'core' &&host.hashes?.[type] ? '#' + host.hashes[type].slice(0, 6) : ''">
@if (host.hashes?.[type]) {
<td class="{{type}} only-large" [style.background-color]="type !== 'core' && host.hashes?.[type] ? '#' + host.hashes[type].slice(0, 6) : ''">
@if (type !== 'core' && host.hashes?.[type]) {
<a [style.color]="'white'" href="https://github.com/mempool/{{repoMap[type]}}/commit/{{ host.hashes[type] }}" target="_blank">{{ host.hashes[type].slice(0, 8) || '?' }}</a>
} @else {
<span>?</span>

View file

@ -23,6 +23,7 @@ export class ServerHealthComponent implements OnInit {
hybrid: 'mempool.space',
backend: 'mempool',
electrs: 'electrs',
ssr: 'mempool.space',
};
constructor(