Skip to content
This repository was archived by the owner on Sep 14, 2024. It is now read-only.

Commit addceb0

Browse files
committed
urgent update
1 parent cc66455 commit addceb0

File tree

5 files changed

+26
-9
lines changed

5 files changed

+26
-9
lines changed

nl_data.pas

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface
66

77
uses
88
Classes, SysUtils, IdTCPClient, dateutils, strutils, formlog,nosotime,
9-
nosoconsensus,nosodebug;
9+
nosoconsensus,nosodebug,nosonosocfg;
1010

1111
Type
1212

@@ -294,6 +294,7 @@ procedure TUpdateThread.Execute;
294294
LLine : String = '';
295295
ActualTime : int64;
296296
LastRefNodes : int64;
297+
NewCFGData : string;
297298
Begin
298299
While not terminated do
299300
begin
@@ -342,7 +343,7 @@ procedure TUpdateThread.Execute;
342343
FillArrayNodes;
343344
LastNodesUpdateTime := 0;
344345
end;
345-
G_NosoCFGStr := GetNosoCFGFromNode;
346+
//G_NosoCFGStr := GetNosoCFGFromNode;
346347
end;
347348
SumReceived := false;
348349
end;
@@ -356,6 +357,16 @@ procedure TUpdateThread.Execute;
356357
RunUpdateGVTs();
357358
end;
358359
end;
360+
if Copy(GetCFGHash,1,5) <> Copy(GetConsensus(19),1,5) then
361+
begin
362+
//ToLog('main','CFG dont match');
363+
NewCFGData := GetNosoCFGFromNode;
364+
if NewCFGData <> '' then
365+
begin
366+
SaveCFGToFile(NewCFGData);
367+
FillArrayNodes;
368+
end;
369+
end;
359370
//}
360371
if GetConsensus(2){lastblock}.ToInteger=GetSumaryLastBlock then Wallet_Synced := true
361372
else Wallet_Synced := false;

nl_network.pas

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,17 @@ function SendOrder(OrderString:String):String;
2424
var
2525
Client : TidTCPClient;
2626
RanNode : integer;
27-
ThisNode : NodeData;
27+
ThisNode : String;
2828
TrysCount : integer = 0;
2929
WasOk : Boolean = false;
3030
Begin
3131
Result := '';
3232
Client := TidTCPClient.Create(nil);
3333
REPEAT
3434
Inc(TrysCount);
35-
RanNode := Random(length(ARRAY_Nodes));
36-
ThisNode := ARRAY_Nodes[RanNode];
37-
Client.Host:=ThisNode.host;
38-
Client.Port:=thisnode.port;
35+
ThisNode := GetRandonNode;
36+
Client.Host := Parameter(ThisNode,0);
37+
Client.Port := StrToIntDef(Parameter(ThisNode,1),8080);
3938
Client.ConnectTimeout:= 3000;
4039
Client.ReadTimeout:=3000;
4140
TRY

nosonosocfg.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ interface
4040
LasTimeCFGRequest : int64 = 0;
4141
DefaultNosoCFG : String = // CFG parameters
4242
{0 Mainnet mode}'NORMAL '+
43-
{1 Seed nodes }'20.199.50.27;8080:107.173.210.55;8080:5.230.55.203;8080:141.11.192.215;8080:4.233.61.8;8080:84.247.143.153;8080:23.95.216.80;8080:64.69.43.225;8080:142.171.231.9;8080: '+
43+
{1 Seed nodes }'84.247.143.153;8080:173.212.222.226;8080:20.199.50.27;8080:4.233.61.8;8080: '+
4444
{2 NTP servers }'ts2.aco.net:hora.roa.es:time.esa.int:time.stdtime.gov.tw:stratum-1.sjc02.svwh.net:ntp1.sp.se:1.de.pool.ntp.org:ntps1.pads.ufrj.br:utcnist2.colorado.edu:tick.usask.ca:ntp1.st.keio.ac.jp: '+
4545
{3 DEPRECATED }'null: '+
4646
{4 DEPRECATED }'null: '+

splashform.lfm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ object Form4: TForm4
1212
OnCreate = FormCreate
1313
Position = poScreenCenter
1414
ShowInTaskBar = stAlways
15-
LCLVersion = '2.2.4.0'
15+
LCLVersion = '3.0.0.3'
1616
Visible = True
1717
object Image1: TImage
1818
Left = 0
@@ -2159,5 +2159,6 @@ object Form4: TForm4
21592159
Font.Style = [fsBold]
21602160
ParentColor = False
21612161
ParentFont = False
2162+
OnClick = LabelSplashClick
21622163
end
21632164
end

splashform.pas

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ TForm4 = class(TForm)
1818
Label2: TLabel;
1919
LabelSplash: TLabel;
2020
procedure FormCreate(Sender: TObject);
21+
procedure LabelSplashClick(Sender: TObject);
2122
private
2223

2324
public
@@ -45,5 +46,10 @@ procedure TForm4.FormCreate(Sender: TObject);
4546
Label1.Caption:='Nosolite v'+ProgramVersion;
4647
end;
4748

49+
procedure TForm4.LabelSplashClick(Sender: TObject);
50+
begin
51+
52+
end;
53+
4854
END. // END UNIT
4955

0 commit comments

Comments
 (0)