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

Commit

Permalink
urgent update
Browse files Browse the repository at this point in the history
  • Loading branch information
NosoDevTeam committed Sep 1, 2024
1 parent cc66455 commit addceb0
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
15 changes: 13 additions & 2 deletions nl_data.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface

uses
Classes, SysUtils, IdTCPClient, dateutils, strutils, formlog,nosotime,
nosoconsensus,nosodebug;
nosoconsensus,nosodebug,nosonosocfg;

Type

Expand Down Expand Up @@ -294,6 +294,7 @@ procedure TUpdateThread.Execute;
LLine : String = '';
ActualTime : int64;
LastRefNodes : int64;
NewCFGData : string;
Begin
While not terminated do
begin
Expand Down Expand Up @@ -342,7 +343,7 @@ procedure TUpdateThread.Execute;
FillArrayNodes;
LastNodesUpdateTime := 0;
end;
G_NosoCFGStr := GetNosoCFGFromNode;
//G_NosoCFGStr := GetNosoCFGFromNode;
end;
SumReceived := false;
end;
Expand All @@ -356,6 +357,16 @@ procedure TUpdateThread.Execute;
RunUpdateGVTs();
end;
end;
if Copy(GetCFGHash,1,5) <> Copy(GetConsensus(19),1,5) then
begin
//ToLog('main','CFG dont match');
NewCFGData := GetNosoCFGFromNode;
if NewCFGData <> '' then
begin
SaveCFGToFile(NewCFGData);
FillArrayNodes;
end;
end;
//}
if GetConsensus(2){lastblock}.ToInteger=GetSumaryLastBlock then Wallet_Synced := true
else Wallet_Synced := false;
Expand Down
9 changes: 4 additions & 5 deletions nl_network.pas
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,17 @@ function SendOrder(OrderString:String):String;
var
Client : TidTCPClient;
RanNode : integer;
ThisNode : NodeData;
ThisNode : String;
TrysCount : integer = 0;
WasOk : Boolean = false;
Begin
Result := '';
Client := TidTCPClient.Create(nil);
REPEAT
Inc(TrysCount);
RanNode := Random(length(ARRAY_Nodes));
ThisNode := ARRAY_Nodes[RanNode];
Client.Host:=ThisNode.host;
Client.Port:=thisnode.port;
ThisNode := GetRandonNode;
Client.Host := Parameter(ThisNode,0);
Client.Port := StrToIntDef(Parameter(ThisNode,1),8080);
Client.ConnectTimeout:= 3000;
Client.ReadTimeout:=3000;
TRY
Expand Down
2 changes: 1 addition & 1 deletion nosonosocfg.pas
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ interface
LasTimeCFGRequest : int64 = 0;
DefaultNosoCFG : String = // CFG parameters
{0 Mainnet mode}'NORMAL '+
{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: '+
{1 Seed nodes }'84.247.143.153;8080:173.212.222.226;8080:20.199.50.27;8080:4.233.61.8;8080: '+
{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: '+
{3 DEPRECATED }'null: '+
{4 DEPRECATED }'null: '+
Expand Down
3 changes: 2 additions & 1 deletion splashform.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object Form4: TForm4
OnCreate = FormCreate
Position = poScreenCenter
ShowInTaskBar = stAlways
LCLVersion = '2.2.4.0'
LCLVersion = '3.0.0.3'
Visible = True
object Image1: TImage
Left = 0
Expand Down Expand Up @@ -2159,5 +2159,6 @@ object Form4: TForm4
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
OnClick = LabelSplashClick
end
end
6 changes: 6 additions & 0 deletions splashform.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ TForm4 = class(TForm)
Label2: TLabel;
LabelSplash: TLabel;
procedure FormCreate(Sender: TObject);
procedure LabelSplashClick(Sender: TObject);
private

public
Expand Down Expand Up @@ -45,5 +46,10 @@ procedure TForm4.FormCreate(Sender: TObject);
Label1.Caption:='Nosolite v'+ProgramVersion;
end;

procedure TForm4.LabelSplashClick(Sender: TObject);
begin

end;

END. // END UNIT

0 comments on commit addceb0

Please sign in to comment.