Commit f1a510d0 authored by Benoit Lavenier's avatar Benoit Lavenier

[fix] Network: make sure to fill medianTime on main BUID, to be able to compute consensusBlockDelta

parent 0f0a2d0b
......@@ -115,6 +115,68 @@
}
},
"le-sou": {
"cacheTimeMs": 300000,
"fallbackLanguage": "fr-FR",
"defaultLanguage": "fr-FR",
"rememberMe": true,
"timeout": 30000,
"timeWarningExpireMembership": 5184000,
"timeWarningExpire": 7776000,
"keepAuthIlde": 600,
"useLocalStorage": true,
"useRelative": false,
"expertMode": false,
"decimalCount": 2,
"httpsMode": false,
"shareBaseUrl": "https://g1.le-sou.org",
"helptip": {
"enable": true,
"installDocUrl": {
"fr-FR": "https://www.le-sou.org/devenir-noeud/",
"en": "https://duniter.org/en/wiki/duniter/install/"
}
},
"license": {
"fr-FR": "license/license_g1-fr-FR",
"en": "license/license_g1-en"
},
"node": {
"host": "g1.le-sou.org",
"port": "443"
},
"fallbackNodes": [
{
"host": "g1.duniter.org",
"port": "443"
},
{
"host": "g1.duniter.fr",
"port": "443"
},
{
"host": "g1.le-sou.org",
"port": "443"
}
],
"plugins":{
"es": {
"enable": true,
"askEnable": false,
"host": "g1.data.le-sou.org",
"port": "443",
"notifications": {
"txSent": true,
"txReceived": true,
"certSent": true,
"certReceived": true
},
"defaultCountry": "France"
}
}
},
"g1-test": {
"cacheTimeMs": 300000,
"fallbackLanguage": "en",
......
......@@ -10,9 +10,9 @@ angular.module("cesium.config", [])
.constant("csConfig", {
"cacheTimeMs": 300000,
"fallbackLanguage": "en",
"fallbackLanguage": "fr-FR",
"defaultLanguage": "fr-FR",
"rememberMe": true,
"showUDHistory": false,
"timeout": 30000,
"timeWarningExpireMembership": 5184000,
"timeWarningExpire": 7776000,
......@@ -22,40 +22,41 @@ angular.module("cesium.config", [])
"expertMode": false,
"decimalCount": 2,
"httpsMode": false,
"shareBaseUrl": "https://g1.duniter.fr",
"shareBaseUrl": "https://g1.le-sou.org",
"helptip": {
"enable": true,
"installDocUrl": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
"installDocUrl": {
"fr-FR": "https://www.le-sou.org/devenir-noeud/",
"en": "https://duniter.org/en/wiki/duniter/install/"
}
},
"license": {
"fr-FR": "license/license_g1-fr-FR",
"en": "license/license_g1-en"
},
"node": {
"host": "g1.duniter.org",
"host": "g1.le-sou.org",
"port": "443"
},
"fallbackNodes": [
{
"host": "g1.duniter.fr",
"host": "g1.duniter.org",
"port": "443"
},
{
"host": "g1.duniter.org",
"host": "g1.duniter.fr",
"port": "443"
}
],
"developers": [
},
{
"name": "Benoit Lavenier",
"pubkey": "38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE"
"host": "g1.le-sou.org",
"port": "443"
}
],
"plugins": {
"es": {
"enable": true,
"askEnable": false,
"host": "g1.data.duniter.fr",
"host": "g1.data.le-sou.org",
"port": "443",
"notifications": {
"txSent": true,
......@@ -67,7 +68,7 @@ angular.module("cesium.config", [])
}
},
"version": "0.17.5",
"build": "2017-10-02T11:42:09.122Z",
"build": "2017-10-03T07:14:09.010Z",
"newIssueUrl": "https://github.com/duniter/cesium/issues/new?labels=bug"
})
......
......@@ -507,7 +507,7 @@ angular.module('cesium.network.services', ['ngApi', 'cesium.bma.services', 'cesi
_.forEach(data.peers, function(peer){
if (peer.buid) {
var buid = buids[peer.buid];
if (!buid) {
if (!buid || !buid.medianTime) {
buid = {
buid: peer.buid,
count: 0,
......@@ -515,6 +515,10 @@ angular.module('cesium.network.services', ['ngApi', 'cesium.bma.services', 'cesi
};
buids[peer.buid] = buid;
}
// If not already done, try to fill medianTime (need to compute consensusBlockDelta)
else if (!buid.medianTime && peer.medianTime) {
buid.medianTime = peer.medianTime;
}
if (buid.buid != constants.UNKNOWN_BUID) {
buid.count++;
}
......
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