Skip to content

Commit

Permalink
Better processing of the possible ends of membership. Members' identi…
Browse files Browse the repository at this point in the history
…ties are never erased in DBase.data. Only one update list in Blockchain. Introduction of iterators in UtilSets. Better implementation of Blockchain.PercentOfSentries. Correction of wrong block number in Blockchain.joinAndLeaveT. In IdentitySearch, 'were members' added, new possiblity of displaying 'were members', members and newcomers, or not, in the identities list, display of quality and centrality level. In WotWizard, display of the number of permutations in metadata, and no certification towards revoked uid or pubkey is taken into account. There is no more greatest allowed execution time of WotWizard. When opening a new WWViews window, if the data has changed since the next time, the window is marked as changed. New version window.
  • Loading branch information
gerard94 committed Apr 15, 2018
1 parent 9c8a553 commit 3ac4206
Show file tree
Hide file tree
Showing 68 changed files with 1,726 additions and 974 deletions.
Binary file modified Server version/Blackbox/Duniter/Mod/Blockchain.odc
Binary file not shown.
Binary file modified Server version/Blackbox/Duniter/Mod/Server.odc
Binary file not shown.
Binary file modified Server version/Blackbox/Duniter/Mod/WWViews.odc
Binary file not shown.
Binary file modified Server version/Blackbox/Util/Bab/Json.odc
Binary file not shown.
Binary file modified Server version/Blackbox/Util/Mod/Alea.odc
Binary file not shown.
Binary file modified Server version/Blackbox/Util/Mod/Sets.odc
Binary file not shown.
7 changes: 4 additions & 3 deletions Server version/Sources/Duniter/Blockchain.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ MODULE DuniterBlockchain;

VAR

i, idRef, jlRef, n, res: INTEGER;
i, idRef, jlRef, n, res, bnb: INTEGER;
tt: LONGINT;
s: ARRAY 101 OF CHAR;
b: BOOLEAN;
Expand Down Expand Up @@ -1604,6 +1604,7 @@ MODULE DuniterBlockchain;
END;
ASSERT(id.hash # "", 104);
Strings.StringToInt(nb, id.block_number, res); ASSERT(res = 0, 105);
bnb := id.block_number;
NEW(idU); NEW(idU.c, LEN(id.uid$) + 1); idU.c^ := id.uid$;
NEW(idP); idP.ref := id.pubkey;
IF idPubT.SearchIns(idP) THEN
Expand Down Expand Up @@ -1642,7 +1643,7 @@ MODULE DuniterBlockchain;
END;
NEW(jlL);
jlL.next := jl .list;
jlL.joiningBlock := id.block_number;
jlL.joiningBlock := bnb;
jlL.leavingBlock := hasNotLeaved;
jl.list := joinAndLeaveLMan.WriteAllocateData(jlL);
joinAndLeaveMan.WriteData(jlRef, jl);
Expand All @@ -1653,7 +1654,7 @@ MODULE DuniterBlockchain;
END;

i := 1;
WHILE ssA[i] # ']' DO (* actives : Update *)
WHILE ssA[i] # ']' DO (* actives *)
INC(i);
NEW(idP);
ScanS(ssA, ':', idP.ref, i);
Expand Down
4 changes: 2 additions & 2 deletions Server version/Sources/Duniter/Server.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ MODULE DuniterServer;

CONST

version = "2.3.3se";
version = "2.4.0se";

rsrcDir = "Duniter/Rsrc"; (* Directory for the two following files *)
parametersName = "Parameters.txt"; (* File containing the greatest allowed allocated memory size and the longest run time for W.CalcPermutations *)
parametersName = "Parameters.txt"; (* File containing the greatest allowed allocated memory size for W.CalcPermutations *)
runningName = "Running.odc"; (* File whose existence shows that WWServer.exe is running *)

textMeta = "WWMeta.json"; (* Json file containing metadata *)
Expand Down
70 changes: 36 additions & 34 deletions Server version/Sources/Duniter/WWViews.txt
Original file line number Diff line number Diff line change
Expand Up @@ -603,40 +603,42 @@ MODULE DuniterWWViews;
ASSERT(f1[1].value IS J.JsonVal, 103);
ASSERT(f1[1].value(J.JsonVal).json IS J.Array, 104);
d := f1[1].value(J.JsonVal).json(J.Array).elements;
FOR i := 0 TO LEN(d) - 1 DO
ASSERT(d[i] IS J.JsonVal, 105);
ASSERT(d[i](J.JsonVal).json IS J.Object, 106);
f2 := d[i](J.JsonVal).json(J.Object).fields;
ASSERT(f2[0].name$ = "after", 107);
ASSERT(f2[0].value IS J.Bool, 108);
ASSERT(f2[1].name$ = "date", 109);
ASSERT(f2[1].value IS J.String, 110);
ASSERT(f2[2].name$ = "names", 111);
ASSERT(f2[2].value IS J.JsonVal, 112);
ASSERT(f2[2].value(J.JsonVal).json IS J.Array, 113);
n := f2[2].value(J.JsonVal).json(J.Array).elements;
FOR k := 0 TO LEN(n) - 1 DO
ASSERT(n[k] IS J.JsonVal, 114);
ASSERT(n[k](J.JsonVal).json IS J.Object, 115);
f3 := n[k](J.JsonVal).json(J.Object).fields;
ASSERT(f3[0].name$ = "name", 116);
ASSERT(f3[0].value IS J.String, 117);
ASSERT(f3[1].name$ = "proba", 118);
ASSERT(f3[1].value IS J.Integer, 119);
NEW(pD);
pD.after := f2[0].value(J.Bool).bool;
pD.date := BA.StringToTimestamp(f2[1].value(J.String).s$);
pD.id := f3[0].value(J.String).s;
pD.proba := SHORT(f3[1].value(J.Integer).n);
e := pD;
b := oD.SearchIns(e, m); ASSERT(~b, 120);
NEW(pM);
pM.after := pD.after;
pM.date := pD.date;
pM.id := pD.id;
pM.proba := pD.proba;
e := pM;
b := oN.SearchIns(e, m); ASSERT(~b, 121);
IF d # NIL THEN
FOR i := 0 TO LEN(d) - 1 DO
ASSERT(d[i] IS J.JsonVal, 105);
ASSERT(d[i](J.JsonVal).json IS J.Object, 106);
f2 := d[i](J.JsonVal).json(J.Object).fields;
ASSERT(f2[0].name$ = "after", 107);
ASSERT(f2[0].value IS J.Bool, 108);
ASSERT(f2[1].name$ = "date", 109);
ASSERT(f2[1].value IS J.String, 110);
ASSERT(f2[2].name$ = "names", 111);
ASSERT(f2[2].value IS J.JsonVal, 112);
ASSERT(f2[2].value(J.JsonVal).json IS J.Array, 113);
n := f2[2].value(J.JsonVal).json(J.Array).elements;
FOR k := 0 TO LEN(n) - 1 DO
ASSERT(n[k] IS J.JsonVal, 114);
ASSERT(n[k](J.JsonVal).json IS J.Object, 115);
f3 := n[k](J.JsonVal).json(J.Object).fields;
ASSERT(f3[0].name$ = "name", 116);
ASSERT(f3[0].value IS J.String, 117);
ASSERT(f3[1].name$ = "proba", 118);
ASSERT(f3[1].value IS J.Integer, 119);
NEW(pD);
pD.after := f2[0].value(J.Bool).bool;
pD.date := BA.StringToTimestamp(f2[1].value(J.String).s$);
pD.id := f3[0].value(J.String).s;
pD.proba := SHORT(f3[1].value(J.Integer).n);
e := pD;
b := oD.SearchIns(e, m); ASSERT(~b, 120);
NEW(pM);
pM.after := pD.after;
pM.date := pD.date;
pM.id := pD.id;
pM.proba := pD.proba;
e := pM;
b := oN.SearchIns(e, m); ASSERT(~b, 121);
END;
END;
END;
END;
Expand Down
2 changes: 1 addition & 1 deletion Server version/Sources/Util/Alea.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ MODULE UtilAlea;
v2 := 2. * g.Random() - 1.;
r := v1 * v1 + v2 * v2;
UNTIL (r < 1.) & (r > 0.);
r := Math.Sqrt( - 2. * Math.Ln(r) / r);
r := Math.Sqrt( -2. * Math.Ln(r) / r);
g.g := v1 * r;
RETURN v2 * r;
END;
Expand Down
12 changes: 12 additions & 0 deletions Server version/Sources/Util/Bab/Json.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
{
Util: Utility tools.

Copyright (C) 2017…2018 GérardMeunier

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}

BABEL UtilJson;


Expand Down
2 changes: 1 addition & 1 deletion Server version/Sources/Util/Sets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with thi

MODULE UtilSets;

(**)


(* The module UtilSets implements the type Set, a set of non-negative integers, represented by intervals. *)

Expand Down
Binary file modified Standalone version/Blackbox/Duniter0/Docu/Identities.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Docu/MakingOf.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Docu/Manual.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Docu/fr/Identities.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Docu/fr/Manual.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Mod/Basic.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Mod/Blockchain.odc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Mod/Clock.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Mod/IdentitySearch.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Mod/Members.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Mod/MembersPrint.odc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Mod/Sandbox.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Mod/WWViews.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Mod/WotWizard.odc
Binary file not shown.
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Rsrc/Clock.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Rsrc/Documentation.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Rsrc/Identities.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Rsrc/SA-Menus.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Rsrc/Sources.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Rsrc/Strings.odc
Binary file not shown.
Binary file not shown.
Binary file modified Standalone version/Blackbox/Duniter0/Rsrc/fr/Strings.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Util/Bab/Json.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Util/Docu/Sets.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Util/Mod/Alea.odc
Binary file not shown.
Binary file added Standalone version/Blackbox/Util/Mod/Net.odc
Binary file not shown.
Binary file modified Standalone version/Blackbox/Util/Mod/Sets.odc
Binary file not shown.
17 changes: 13 additions & 4 deletions Standalone version/Documentation/MakingOf.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ Kernel$+ Files HostFiles HostPackedFiles StdLoader
1 Move.cur 2 Copy.cur 3 Link.cur 4 Pick.cur 5 Stop.cur 6 Hand.cur 7 Table.cur

DevPacker.PackThis WotWizard.exe :=
Babel/Code/Compil.ocf Dev/Code/Search.ocf Duniter0/Code/Basic.ocf Duniter0/Code/Blockchain.ocf Duniter0/Code/CertificationsPrint.ocf Duniter0/Code/Certifiers.ocf Duniter0/Code/Clock.ocf Duniter0/Code/Dates.ocf Duniter0/Code/IdentitiesPrint.ocf Duniter0/Code/IdentitySearch.ocf Duniter0/Code/Members.ocf Duniter0/Code/MembersPrint.ocf Duniter0/Code/ParametersPrint.ocf Duniter0/Code/Sandbox.ocf Duniter0/Code/SandboxPrint.ocf Duniter0/Code/SentriesPrint.ocf Duniter0/Code/WWViews.ocf Duniter0/Code/WotWizard.ocf Duniter0/Code/WotWizardPrint.ocf Host/Code/CFrames.ocf Host/Code/Clipboard.ocf Host/Code/Cmds.ocf Host/Code/Dialog.ocf Host/Code/Files.ocf Host/Code/Fonts.ocf Host/Code/Mechanisms.ocf Host/Code/Menus.ocf Host/Code/Ports.ocf Host/Code/Printers.ocf Host/Code/Registry.ocf Host/Code/Windows.ocf Ole/Code/Data.ocf Sql/Code/DB.ocf Sql/Code/Drivers.ocf Std/Code/Api.ocf Std/Code/CFrames.ocf Std/Code/Cmds.ocf Std/Code/Dialog.ocf Std/Code/Interpreter.ocf Std/Code/Links.ocf Std/Code/Loader.ocf Std/Code/Log.ocf Std/Code/MenuTool.ocf System/Code/Containers.ocf System/Code/Controllers.ocf System/Code/Controls.ocf System/Code/Converters.ocf System/Code/Dates.ocf System/Code/Dialog.ocf System/Code/Documents.ocf System/Code/Files.ocf System/Code/Fonts.ocf System/Code/Init.ocf System/Code/Kernel.ocf System/Code/Log.ocf System/Code/Math.ocf System/Code/Mechanisms.ocf System/Code/Meta.ocf System/Code/Models.ocf System/Code/Ports.ocf System/Code/Printers.ocf System/Code/Printing.ocf System/Code/Properties.ocf System/Code/Sequencers.ocf System/Code/Services.ocf System/Code/Stores.ocf System/Code/Strings.ocf System/Code/Views.ocf System/Code/Windows.ocf Text/Code/Cmds.ocf Text/Code/Controllers.ocf Text/Code/Mappers.ocf Text/Code/Models.ocf Text/Code/Rulers.ocf Text/Code/Setters.ocf Text/Code/Views.ocf Unicode/Code/Case_Mapping.ocf Unicode/Code/Letter_Mapping.ocf Util/Code/Alea.ocf Util/Code/AvlTree.ocf Util/Code/BBTree.ocf Util/Code/BTree.ocf Util/Code/Json.ocf Util/Code/Sets.ocf Util/Code/Sort.ocf
Babel/Code/Compil.ocf Duniter0/Code/Basic.ocf Duniter0/Code/Blockchain.ocf Duniter0/Code/Centralities.ocf Duniter0/Code/CentralitiesJson.ocf Duniter0/Code/CertificationsPrint.ocf Duniter0/Code/Certifiers.ocf Duniter0/Code/Clock.ocf Duniter0/Code/Dates.ocf Duniter0/Code/IdentitiesPrint.ocf Duniter0/Code/IdentitySearch.ocf Duniter0/Code/Members.ocf Duniter0/Code/MembersPrint.ocf Duniter0/Code/ParametersPrint.ocf Duniter0/Code/QualitiesJson.ocf Duniter0/Code/QualitiesSetsArr.ocf Duniter0/Code/Sandbox.ocf Duniter0/Code/SandboxPrint.ocf Duniter0/Code/SentriesPrint.ocf Duniter0/Code/WWViews.ocf Duniter0/Code/WotWizard.ocf Host/Code/CFrames.ocf Host/Code/Clipboard.ocf Host/Code/Cmds.ocf Host/Code/Dialog.ocf Host/Code/Files.ocf Host/Code/Fonts.ocf Host/Code/Mechanisms.ocf Host/Code/Menus.ocf Host/Code/Ports.ocf Host/Code/Printers.ocf Host/Code/Registry.ocf Host/Code/Windows.ocf Ole/Code/Data.ocf Sql/Code/DB.ocf Sql/Code/Drivers.ocf Std/Code/Api.ocf Std/Code/CFrames.ocf Std/Code/Cmds.ocf Std/Code/Dialog.ocf Std/Code/Interpreter.ocf Std/Code/Links.ocf Std/Code/Loader.ocf Std/Code/Log.ocf Std/Code/MenuTool.ocf System/Code/Containers.ocf System/Code/Controllers.ocf System/Code/Controls.ocf System/Code/Converters.ocf System/Code/Dates.ocf System/Code/Dialog.ocf System/Code/Documents.ocf System/Code/Files.ocf System/Code/Fonts.ocf System/Code/Init.ocf System/Code/Kernel.ocf System/Code/Log.ocf System/Code/Math.ocf System/Code/Mechanisms.ocf System/Code/Meta.ocf System/Code/Models.ocf System/Code/Ports.ocf System/Code/Printers.ocf System/Code/Printing.ocf System/Code/Properties.ocf System/Code/Sequencers.ocf System/Code/Services.ocf System/Code/Stores.ocf System/Code/Strings.ocf System/Code/Views.ocf System/Code/Windows.ocf Text/Code/Cmds.ocf Text/Code/Controllers.ocf Text/Code/Mappers.ocf Text/Code/Models.ocf Text/Code/Rulers.ocf Text/Code/Setters.ocf Text/Code/Views.ocf Unicode/Code/Case_Mapping.ocf Unicode/Code/Letter_Mapping.ocf Util/Code/Alea.ocf Util/Code/AvlTree.ocf Util/Code/BBTree.ocf Util/Code/BTree.ocf Util/Code/Json.ocf Util/Code/Net.ocf Util/Code/Sets.ocf Util/Code/Sort.ocf

Babel/Docu/Compil.odc
Babel/Mod/Compil.odc
Cpc/Code/Bitmaps.ocf
Cpc/Code/Compressors.ocf
Cpc/Code/CompressorsConv.ocf
Expand All @@ -35,6 +37,7 @@ Ctls/Code/Buttons2.ocf
Dev/Code/Browser.ocf
Dev/Code/Commanders.ocf
Dev/Code/Debug.ocf
Dev/Code/Search.ocf
Dev/Rsrc/Strings.odc
Dev/Rsrc/fr/Strings.odc
Docu/CP-Lang.odc
Expand All @@ -47,6 +50,8 @@ Duniter0/Docu/Manual.odc
Duniter0/Docu/fr/Manual.odc
Duniter0/Mod/Basic.odc
Duniter0/Mod/Blockchain.odc
Duniter0/Mod/Centralities.odc
Duniter0/Mod/CentralitiesJson.odc
Duniter0/Mod/CertificationsPrint.odc
Duniter0/Mod/Certifiers.odc
Duniter0/Mod/Clock.odc
Expand All @@ -56,13 +61,13 @@ Duniter0/Mod/IdentitySearch.odc
Duniter0/Mod/Members.odc
Duniter0/Mod/MembersPrint.odc
Duniter0/Mod/ParametersPrint.odc
Duniter0/Mod/SA-Config.odc
Duniter0/Mod/QualitiesJson.odc
Duniter0/Mod/QualitiesSetsArr.odc
Duniter0/Mod/Sandbox.odc
Duniter0/Mod/SandboxPrint.odc
Duniter0/Mod/SentriesPrint.odc
Duniter0/Mod/WotWizard.odc
Duniter0/Mod/WotWizardPrint.odc
Duniter0/Mod/WWViews.odc
Duniter0/Mod/WotWizard.odc
Duniter0/Rsrc/About.odc
Duniter0/Rsrc/Clock.odc
Duniter0/Rsrc/Dates.odc
Expand All @@ -73,6 +78,7 @@ Duniter0/Rsrc/Sources.odc
Duniter0/Rsrc/Strings.odc
Duniter0/Rsrc/fr/Strings.odc
Duniter0/Rsrc/SA-Menus.odc => System/Rsrc/Menus.odc
Duniter0/Rsrc/Version.odc
Form/Code/Controllers.ocf
Form/Code/Models.ocf
Form/Code/Views.ocf
Expand Down Expand Up @@ -103,6 +109,7 @@ System/Rsrc/fr/Strings.odc
Text/Rsrc/Cmds.odc
Text/Rsrc/Strings.odc
Text/Rsrc/fr/Strings.odc
Util/Bab/Json.odc
Util/Code/External.ocf
Util/Docu/Alea.odc
Util/Docu/AvlTree.odc
Expand All @@ -114,6 +121,8 @@ Util/Mod/Alea.odc
Util/Mod/AvlTree.odc
Util/Mod/BBTree.odc
Util/Mod/BTree.odc
Util/Mod/Json.odc
Util/Mod/Net.odc
Util/Mod/Sets.odc
Util/Mod/Sort.odc
Util/Rsrc/Json.tbl
Expand Down
Loading

0 comments on commit 3ac4206

Please sign in to comment.