Commit 243be2f9 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Fix: gen-next command was broken

parent 0da8eb13
......@@ -211,8 +211,7 @@ module.exports = new function() {
};
function signed (raw, json) {
if (json.signature)
raw += json.signature + '\n';
raw += json.signature + '\n';
return raw;
}
}
};
......@@ -944,6 +944,7 @@ function BlockchainService (conf, mainDAL, pair) {
var block = new Block();
block.version = 1;
block.currency = current ? current.currency : conf.currency;
block.nonce = 0;
block.number = current ? current.number + 1 : 0;
block.parameters = block.number > 0 ? '' : [
conf.c, conf.dt, conf.ud0,
......
......@@ -792,6 +792,9 @@ function exit (server) {
function logIfErrorAndExit (server, prefix) {
return function (err) {
if (err && err.uerr) {
err = err.uerr.message;
}
err && logger.error((prefix ? prefix : "") + (err.message || err));
server.disconnect();
process.exit();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment