Browse Source

remove some getinfo calls that i missed.

fix-133-memory-crash
Dan Janosik 7 years ago
parent
commit
d6320b3909
  1. 6
      routes/baseActionsRouter.js
  2. 2
      views/node-info.pug

6
routes/baseActionsRouter.js

@ -149,13 +149,13 @@ router.get("/blocks", function(req, res) {
res.locals.sort = sort; res.locals.sort = sort;
res.locals.paginationBaseUrl = "/blocks"; res.locals.paginationBaseUrl = "/blocks";
rpcApi.getInfo().then(function(getinfo) { rpcApi.getBlockchainInfo().then(function(getblockchaininfo) {
res.locals.blockCount = getinfo.blocks; res.locals.blockCount = getblockchaininfo.blocks;
res.locals.blockOffset = offset; res.locals.blockOffset = offset;
var blockHeights = []; var blockHeights = [];
if (sort == "desc") { if (sort == "desc") {
for (var i = (getinfo.blocks - offset); i > (getinfo.blocks - offset - limit); i--) { for (var i = (getblockchaininfo.blocks - offset); i > (getblockchaininfo.blocks - offset - limit); i--) {
blockHeights.push(i); blockHeights.push(i);
} }
} else { } else {

2
views/node-info.pug

@ -15,7 +15,7 @@ block content
if (false) if (false)
pre pre
code #{JSON.stringify(getinfo, null, 4)} code #{JSON.stringify(getblockchaininfo, null, 4)}
if (true) if (true)
table(class="table") table(class="table")

Loading…
Cancel
Save