Skip to content
Snippets Groups Projects
Commit e96f1ccd authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

Currency wot rules: sentries formula - fix #291

parent 727d1250
No related branches found
No related tags found
No related merge requests found
......@@ -156,6 +156,8 @@
"SIG_WINDOW": "Maximum delay before a certification<br/>will be treated",
"STEP_MAX": "Maximum distance between<br/>each WoT member and a newcomer.",
"WOT_RULES_DIVIDER": "Rules for web of trust",
"SENTRIES": "Required number of certifications<br/>to become a sentries",
"SENTRIES_FORMULA": "Required number of certifications<br/>to become a sentries (formula)",
"XPERCENT":"Minimum percent of sentries<br />to reach to match the distance rule",
"AVG_GEN_TIME": "The average time between 2 blocks",
"CURRENT": "current"
......
......@@ -156,6 +156,8 @@
"SIG_WINDOW": "Maximum delay before a certification<br/>will be treated",
"STEP_MAX": "Maximum distance between<br/>each WoT member and a newcomer.",
"WOT_RULES_DIVIDER": "Rules for web of trust",
"SENTRIES": "Required number of certifications<br/>to become a sentries",
"SENTRIES_FORMULA": "Required number of certifications<br/>to become a sentries (formula)",
"XPERCENT":"Minimum percent of sentries<br />to reach to match the distance rule",
"AVG_GEN_TIME": "The average time between 2 blocks",
"CURRENT": "current"
......
......@@ -154,9 +154,11 @@
"SIG_STOCK": "Nombre maximal de certifications émises<br/>par membre",
"SIG_PERIOD": "Délai minimal d'attente entre 2 certifications<br/>successives émises par une même personne.",
"SIG_WINDOW": "Délai maximal d'attente avant<br/>prise en compte d'une certification",
"STEP_MAX": "Distance maximale dans la toile de confiance <br /> entre chaque membre et un nouvel entrant.",
"STEP_MAX": "Distance maximale dans la toile de confiance <br/> entre chaque membre et un nouvel entrant.",
"WOT_RULES_DIVIDER": "Règles de la toile de confiance",
"XPERCENT":"Pourcentage minimum de sentinelle<br/>à atteindre pour respecter la règle de distance.",
"SENTRIES": "Nombre de certification requises<br/>pour être sentinelle",
"SENTRIES_FORMULA": "Nombre de certification<br/>pour être sentinelle (formule)",
"XPERCENT":"Pourcentage minimum de sentinelle<br/>à atteindre pour respecter la règle de distance",
"AVG_GEN_TIME": "Temps moyen entre deux blocs",
"CURRENT": "actuel"
}
......
......@@ -154,6 +154,7 @@ function CurrencyViewController($scope, $q, $timeout, BMA, UIUtils, csSettings,
difficulty : 0,
Nprev: 0,
stepMax: 0,
sentries: 0,
xpercent: 0,
durationFromLastUD: 0,
blockUid: null,
......@@ -281,6 +282,7 @@ function CurrencyViewController($scope, $q, $timeout, BMA, UIUtils, csSettings,
data.UD = data.currentUD;
data.durationFromLastUD = lastUDTime ? data.medianTime - lastUDTime : 0;
data.useRelative = $scope.formData.useRelative;
data.sentries = Math.ceil(Math.pow(data.N, 1/ data.stepMax));
// Apply to formData
angular.copy(data, $scope.formData);
......
<ion-list bind-notifier="{ rebind:formData.useRelative }">
<ion-item class="item-icon-left">
<ion-item class="item-icon-left item-text-wrap">
<i class="icon ion-person-stalker"></i>
<span translate>CURRENCY.VIEW.MEMBERS</span> (N<sub>{{'CURRENCY.VIEW.CURRENT'|translate}}</sub>)
<span class="badge badge-assertive" ng-if="!loading">{{formData.N | formatInteger}}</span>
......@@ -17,6 +17,12 @@
</div>
</ion-item>
<ion-item class="item-icon-left item-text-wrap">
<i class="icon ion-ribbon-b"></i>
<b class="ion-star " style="color: yellow; position: absolute; font-size: 16px; left: 25px; bottom: 32px"></b>
<span translate>CURRENCY.VIEW.SENTRIES</span>
<span class="badge badge-royal" ng-if="!loading">{{formData.sentries}}</span>
</ion-item>
<div id="helptip-currency-rules"
class="item item-divider">
......@@ -54,10 +60,18 @@
<ion-item class="item-icon-left item-text-wrap">
<i class="icon ion-steam"></i>
<span class="col col-75" translate>CURRENCY.VIEW.STEP_MAX</span>
<b class="ion-person" style="position: absolute; font-size: 16px; left: 38px; top: 17px"></b>
<span class="col col-75"><span ng-bind-html="'CURRENCY.VIEW.STEP_MAX'|translate"></span> (stepMax)</span>
<span class="badge badge-stable" ng-if="!loading">{{formData.stepMax}}</span>
</ion-item>
<ion-item class="item-icon-left item-text-wrap">
<i class="icon ion-ribbon-b"></i>
<b class="ion-star " style="color: yellow; position: absolute; font-size: 16px; left: 25px; bottom: 32px"></b>
<span ng-bind-html="'CURRENCY.VIEW.SENTRIES_FORMULA'|translate"></span>
<span class="item-note dark" ng-if="!loading">CEIL( N<sub>t</sub><sup>^ (1 / stepMax)</sup>)</span>
</ion-item>
<ion-item class="item-icon-left item-text-wrap">
<i class="icon ion-pull-request"></i>
<span class="col col-75" translate>CURRENCY.VIEW.XPERCENT</span>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment