Return HTTP 503 from Fee Api when mempool is still syncing.

Fix for displaying git commit on About page.
This commit is contained in:
softsimon committed 2020-08-12 13:33:58 +07:00
1 parent dd0b67716f
commit 2d02ec7092
8 files changed
+54 -48

No files matched your search

+5
View File
@@ -57,6 +57,11 @@ class Routes {
}
public async getRecommendedFees(req: Request, res: Response) {
if (!mempool.isInSync()) {
res.statusCode = 503;
res.send('Service Unavailable');
return;
}
const result = feeApi.getRecommendedFee();
res.json(result);
}