Skip to content
Snippets Groups Projects
Commit 14d7314f authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] broken "blocks made by this key"

parent 028d81ec
Branches
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ const _ = require('underscore'); ...@@ -11,6 +11,7 @@ const _ = require('underscore');
const Q = require('q'); const Q = require('q');
const co = require('co'); const co = require('co');
const rawer = {} const rawer = {}
const toJson = require("duniter/app/modules/bma/lib/tojson");
module.exports = (duniterServer, startServices, stopServices, listDuniterUIPlugins, stack) => { module.exports = (duniterServer, startServices, stopServices, listDuniterUIPlugins, stack) => {
return new WebAdmin(duniterServer, startServices, stopServices, listDuniterUIPlugins, stack); return new WebAdmin(duniterServer, startServices, stopServices, listDuniterUIPlugins, stack);
...@@ -111,7 +112,7 @@ function WebAdmin (duniterServer, startServices, stopServices, listDuniterUIPlug ...@@ -111,7 +112,7 @@ function WebAdmin (duniterServer, startServices, stopServices, listDuniterUIPlug
yield pluggedDALP; yield pluggedDALP;
return { return {
"total": yield server.getCountOfSelfMadePoW(), "total": yield server.getCountOfSelfMadePoW(),
"mirror": !(yield server.isServerMember()), "mirror": !(yield isServerMember(server)),
"waiting": true "waiting": true
}; };
}); });
...@@ -764,3 +765,8 @@ async function getLastBlockWithDividend(server) { ...@@ -764,3 +765,8 @@ async function getLastBlockWithDividend(server) {
} }
util.inherits(WebAdmin, stream.Duplex); util.inherits(WebAdmin, stream.Duplex);
async function isServerMember(server) {
return server.dal.isMember(server.conf.pair.pub)
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment