Merge branch 'master' into nymkappa/bugfix/reindex-when-fast-forward

This commit is contained in:
Felipe Knorr Kuhn authored and GitHub committed 2022-05-19 10:01:06 -07:00
commit 8797b6e304
5 files changed
+1550 -24

No files matched your search

+2
View File
@@ -723,6 +723,7 @@ class Routes {
public async getBlocksExtras(req: Request, res: Response) {
try {
const height = req.params.height === undefined ? undefined : parseInt(req.params.height, 10);
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(await blocks.$getBlocksExtras(height, 15));
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
@@ -1002,6 +1003,7 @@ class Routes {
public async $getRewardStats(req: Request, res: Response) {
try {
const response = await mining.$getRewardStats(parseInt(req.params.blockCount, 10));
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(response);
} catch (e) {
res.status(500).end();