diff --git a/app/lib/dal/fileDALs/confDAL.js b/app/lib/dal/fileDALs/confDAL.js index e6331af335d6aa83c4cfabcfd3fdb75e32b850d2..e9ab9b82a0f469a740e4b7a3750e8b734b2a88c7 100644 --- a/app/lib/dal/fileDALs/confDAL.js +++ b/app/lib/dal/fileDALs/confDAL.js @@ -40,7 +40,10 @@ function ConfDAL(rootPath, qioFS, parentCore, localDAL, AbstractStorage) { "medianTimeBlocks": parseInt(conf.medianTimeBlocks,10), "avgGenTime": parseInt(conf.avgGenTime,10), "dtDiffEval": parseInt(conf.dtDiffEval,10), - "percentRot": parseFloat(conf.percentRot) + "percentRot": parseFloat(conf.percentRot), + "udTime0": parseInt(conf.udTime0), + "udReevalTime0": parseInt(conf.udReevalTime0), + "dtReeval": parseInt(conf.dtReeval) }; }); diff --git a/package.json b/package.json index a810dea17139347e534e1774f9965b71c520ee25..28e7e1ef1b66a9486d77a3de9930ca91f3ffd134 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,8 @@ "colors": "1.1.2", "commander": "2.9.0", "daemonize2": "0.4.2", - "duniter-bma": "^0.2.11", "duniter-common": "0.1.0", + "duniter-bma": "^1.0.0", "duniter-crawler": "^1.0.0", "duniter-keypair": "^0.3.0", "duniter-prover": "^1.0.0", diff --git a/test/integration/http_api.js b/test/integration/http_api.js index 820593a1b4885de85f17f41fbd0ca0bf397f6710..86171f3f524ce26ee72145dbd0c9f3d99b6da5de 100644 --- a/test/integration/http_api.js +++ b/test/integration/http_api.js @@ -21,6 +21,10 @@ const server = duniter( currency: 'bb', httpLogs: true, sigQty: 1, + dt: 60, + dtReeval: 120, + udTime0: 1488902199, + udReevalTime0: 1520438199, pair: { pub: 'HgTTJLAQ5sqfknMq7yLPZbehtuLSsKj9CxWN7k8QvYJd', sec: '51w4fEShBk1jCMauWu4mLpmDVfHksKmWcygpxriqCEZizbtERA6de4STKRkQBpxmMUwsKXRjSzuQ8ECwmqN1u2DP' @@ -61,6 +65,15 @@ describe("HTTP API", function() { describe("/blockchain", function() { + it('/parameters/ should give the parameters', function() { + return expectJSON(rp('http://127.0.0.1:7777/blockchain/parameters', { json: true }), { + udTime0: 1488902199, + udReevalTime0: 1520438199, + dt: 60, + dtReeval: 120 + }); + }); + it('/block/0 should exist', function() { return expectJSON(rp('http://127.0.0.1:7777/blockchain/block/0', { json: true }), { number: 0 @@ -154,7 +167,7 @@ describe("HTTP API", function() { client.on('message', function message(data) { const block = JSON.parse(data); should(block).have.property('number', 4); - should(block).have.property('dividend', null); + should(block).have.property('dividend'); if (!completed) { completed = true; done();