Replace cached blocks on reorg, serve stale blocks

This commit is contained in:
Mononaut
2023-07-08 00:33:14 -04:00
parent 408c86963b
commit 385cb087d3
5 changed files with 25 additions and 8 deletions

View File

@@ -29,6 +29,7 @@ class BitcoinApi implements AbstractBitcoinApi {
weight: block.weight,
previousblockhash: block.previousblockhash,
mediantime: block.mediantime,
stale: block.confirmations === -1,
};
}

View File

@@ -89,6 +89,7 @@ export namespace IEsploraApi {
weight: number;
previousblockhash: string;
mediantime: number;
stale: boolean;
}
export interface Address {