Replace cached blocks on reorg, serve stale blocks

This commit is contained in:
Mononaut committed 2023-07-10 16:14:02 +09:00
1 parent 408c86963b
commit 385cb087d3
5 files changed
+25 -8

No files matched your search

+1
View File
@@ -29,6 +29,7 @@ class BitcoinApi implements AbstractBitcoinApi {
weight: block.weight,
previousblockhash: block.previousblockhash,
mediantime: block.mediantime,
stale: block.confirmations === -1,
};
}
@@ -89,6 +89,7 @@ export namespace IEsploraApi {
weight: number;
previousblockhash: string;
mediantime: number;
stale: boolean;
}
export interface Address {