Skip to content

Commit

Permalink
Da1
Browse files Browse the repository at this point in the history
  • Loading branch information
NosoDevTeam committed Mar 22, 2024
1 parent 341536e commit f96aa1b
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 25 deletions.
2 changes: 1 addition & 1 deletion lastrelease.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.2Cb6 0.4.2Cb7 x {LastOfficial} {LastBeta} {TestNet}
0.4.2Da1 0.4.2Da1 x {LastOfficial} {LastBeta} {TestNet}
31 changes: 18 additions & 13 deletions masterpaskalform.pas
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ TForm1 = class(TForm)
RestartFileName = 'launcher.sh';
updateextension = 'tgz';
{$ENDIF}
NodeRelease = 'Cb7';
NodeRelease = 'Da1';
OficialRelease = true;
BetaRelease = false;
VersionRequired = '0.4.2';
Expand Down Expand Up @@ -874,18 +874,19 @@ procedure TUpdateLogs.UpdateExceps();

procedure TUpdateLogs.Execute;
Begin
AddNewOpenThread('UpdateLogs',UTCTime);
While not terminated do
begin
sleep(10);
while GetLogLine('console',lastlogline) do Synchronize(@UpdateConsole);
while GetLogLine('events',lastlogline) do Synchronize(@UpdateEvents);
while GetLogLine('exceps',lastlogline) do Synchronize(@UpdateExceps);
GetLogLine('nodeftp',lastlogline);
// Deep debug
Repeat
until not GetDeepDebLine(lastlogline);
end;
AddNewOpenThread('UpdateLogs',UTCTime);
While not terminated do
begin
sleep(10);
UpdateOpenThread('UpdateLogs',UTCTime);
while GetLogLine('console',lastlogline) do Synchronize(@UpdateConsole);
while GetLogLine('events',lastlogline) do Synchronize(@UpdateEvents);
while GetLogLine('exceps',lastlogline) do Synchronize(@UpdateExceps);
GetLogLine('nodeftp',lastlogline);
// Deep debug
Repeat
until not GetDeepDebLine(lastlogline);
end;
End;

{$ENDREGION Thread update logs}
Expand Down Expand Up @@ -1209,6 +1210,7 @@ procedure TUpdateMNs.Execute;
MNsRandomWait := Random(21);
While not terminated do
begin
UpdateOpenThread('Masternodes',UTCTime);
if UTCTime mod 10 = 0 then
begin
if ( (IsValidator(LocalMN_IP)) and (BlockAge>500+(MNsRandomWait div 4)) and (Not IsMyMNCheckDone) and
Expand Down Expand Up @@ -1266,6 +1268,7 @@ constructor TCryptoThread.Create(CreateSuspended : boolean);
AddNewOpenThread('Crypto',UTCTime);
While not terminated do
begin
UpdateOpenThread('Crypto',UTCTime);
NewAddrss := 0;
if length(ArrayCriptoOp)>0 then
begin
Expand Down Expand Up @@ -1365,6 +1368,7 @@ procedure TThreadSendOutMsjs.Execute;
AddNewOpenThread('SendMSGS',UTCTime);
While not terminated do
begin
UpdateOpenThread('SendMSGS',UTCTime);
if OutgoingMsjs.Count > 0 then
begin
Linea := OutgoingMsjsGet();
Expand Down Expand Up @@ -2027,6 +2031,7 @@ procedure TForm1.OffersGridResize(Sender: TObject);
// App heartbeat
Procedure TForm1.heartbeat(sender: TObject);
Begin
UpdateOpenThread('Main',UTCTime);
if EngineLastUpdate <> UTCtime then EngineLastUpdate := UTCtime;
Form1.Latido.Enabled:=false;
if ( (UTCTime >= BuildNMSBlock) and (BuildNMSBlock>0) and (MyConStatus=3) and (MyLastBlock=StrToIntDef(GetCOnsensus(2),-1)) ) then
Expand Down
4 changes: 2 additions & 2 deletions nosoheaders.pas
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function GetResumenHash():String;
NewData.block := BlockNumber;
NewData.blockhash := BlockHash;
NewData.SumHash := SumHash;
filemode := 2;
EnterCriticalSection(CS_HeadersFile);
TRY
reset(FileResumen);
Expand All @@ -125,6 +126,7 @@ function GetResumenHash():String;
PorperlyClosed : boolean = false;
Begin
Result := true;
filemode := 2;
EnterCriticalSection(CS_HeadersFile);
TRY
reset(FileResumen);
Expand Down Expand Up @@ -243,7 +245,6 @@ function GetResumenHash():String;
TRY
reset(FileResumen);
Opened := true;
ToDeepDeb('NosoHeaders,LastHeadersString,'+'Opened');
ThisData := Default(ResumenData);
seek(fileResumen,FromBlock-100);
While not Eof(fileResumen) do
Expand All @@ -253,7 +254,6 @@ function GetResumenHash():String;
end;
closefile(FileResumen);
PorperlyClosed := true;
ToDeepDeb('NosoHeaders,LastHeadersString,'+'Closed');
EXCEPT on E:Exception do
begin
ToDeepDeb('NosoHeaders,LastHeadersString,'+E.Message);
Expand Down
4 changes: 2 additions & 2 deletions nosomasternodes.pas
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ function RunMNVerification(Block:integer;LocSynctus:String;LocalIP:String;public
sleep(100);
Inc(WaitCycles);
until ( (VerifyThreadsCount= 0) or (WaitCycles = 250) );
ToDeepDeb(Format('MNs verification finish: %d launched, %d Open, %d cycles',[Launched,VerifyThreadsCount,WaitCycles ]));
ToDeepDeb(Format('Unconfirmed IPs: %d',[UnconfirmedIPs ]));
//ToDeepDeb(Format('MNs verification finish: %d launched, %d Open, %d cycles',[Launched,VerifyThreadsCount,WaitCycles ]));
//ToDeepDeb(Format('Unconfirmed IPs: %d',[UnconfirmedIPs ]));
if VerifyThreadsCount>0 then
begin
EnterCriticalSection(CSVerifyThread);
Expand Down
9 changes: 8 additions & 1 deletion nosonetwork.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1125,11 +1125,12 @@ procedure TThreadClientRead.Execute;
AddNewOpenThread(ThreadName,UTCTime);
LastActive := UTCTime;
REPEAT
TRY
sleep(10);
OnBuffer := true;
if CanalCliente[FSlot].IOHandler.InputBufferIsEmpty then
begin
CanalCliente[FSlot].IOHandler.CheckForDataOnSource(100);
CanalCliente[FSlot].IOHandler.CheckForDataOnSource(1000);
if CanalCliente[FSlot].IOHandler.InputBufferIsEmpty then
begin
OnBuffer := false;
Expand Down Expand Up @@ -1265,6 +1266,12 @@ procedure TThreadClientRead.Execute;
if LastActive + 30 < UTCTime then killit := true;
if GetConexIndex(Fslot).tipo <> 'SER' then killit := true;
if not CanalCliente[FSlot].Connected then killit := true;
EXCEPT ON E:Exception do
begin
ToDeepDeb('NosoNetwork,TThreadClientRead,'+E.Message);
KillIt := True;
end;
END;
UNTIL ( (terminated) or (KillIt) );
CloseSlot(Fslot);
DecClientReadThreads;
Expand Down
2 changes: 1 addition & 1 deletion nosotime.pas
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function TimeSinceStamp(Lvalue:int64):string;
Elapsed : Int64 = 0;
Begin
Elapsed := UTCTime - Lvalue;
if Elapsed div 60 < 1 then result := '<1m'
if Elapsed div 60 < 1 then result := IntToStr(Elapsed)+'s'
else if Elapsed div 3600 < 1 then result := IntToStr(Elapsed div 60)+'m'
else if Elapsed div 86400 < 1 then result := IntToStr(Elapsed div 3600)+'h'
else if Elapsed div 2592000 < 1 then result := IntToStr(Elapsed div 86400)+'d'
Expand Down
8 changes: 3 additions & 5 deletions releasenotes.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
Version 0.4.2 Cb7
Version 0.4.2Da1

Beta release. Use it ONLY if you are a beta tester.
Official release. Valid for masternodes and servcie providers.

- RPC performance.
- Updated options
- Protected client write.
- Client thread protected.



0 comments on commit f96aa1b

Please sign in to comment.