Browse Source

share the same template for /block/ and /block-height/

fix-133-memory-crash
Dan Janosik 7 years ago
parent
commit
ce005f9df3
  1. 2
      routes/baseActionsRouter.js
  2. 13
      views/block-height.pug

2
routes/baseActionsRouter.js

@ -357,7 +357,7 @@ router.get("/block-height/:blockHeight", function(req, res) {
res.locals.result.transactions = result.transactions; res.locals.result.transactions = result.transactions;
res.locals.result.txInputsByTransaction = result.txInputsByTransaction; res.locals.result.txInputsByTransaction = result.txInputsByTransaction;
res.render("block-height"); res.render("block");
}); });
}); });
}); });

13
views/block-height.pug

@ -1,13 +0,0 @@
extends layout
block headContent
title Block #{blockHeight}
block content
h1(class="h2") Block
small(class="monospace") ##{blockHeight.toLocaleString()}
br
small(style="width: 100%;", class="monospace word-wrap") #{result.getblock.hash}
hr
include includes/block-content.pug
Loading…
Cancel
Save