Skip to content

Commit

Permalink
Cb3
Browse files Browse the repository at this point in the history
  • Loading branch information
NosoDevTeam committed Mar 6, 2024
1 parent 7d8c1c2 commit 740ad8c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lastrelease.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.2Cb2 0.4.2Cb2 x {LastOfficial} {LastBeta} {TestNet}
0.4.2Cb3 0.4.2Cb3 x {LastOfficial} {LastBeta} {TestNet}
34 changes: 33 additions & 1 deletion masterpaskalform.pas
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ TForm1 = class(TForm)

// NODE SERVER
Function TryMessageToNode(AContext: TIdContext;message:string):boolean;
Function GetStreamFromContext(AContext: TIdContext;out LStream:TMemoryStream):boolean;

// RPC
procedure RPCServerExecute(AContext: TIdContext;
Expand Down Expand Up @@ -581,7 +582,7 @@ TForm1 = class(TForm)
RestartFileName = 'launcher.sh';
updateextension = 'tgz';
{$ENDIF}
NodeRelease = 'Cb2';
NodeRelease = 'Cb3';
OficialRelease = true;
BetaRelease = false;
VersionRequired = '0.4.2';
Expand Down Expand Up @@ -2330,6 +2331,19 @@ function TForm1.ClientsCount : Integer ;
END;{Try}
End;

// Get stream from client
Function TForm1.GetStreamFromContext(AContext: TIdContext;out LStream:TMemoryStream):boolean;
Begin
result := false;
LStream.Clear;
TRY
AContext.Connection.IOHandler.ReadStream(LStream);
Result := True;
EXCEPT on E:Exception do
ToDeepDeb('NosoServer,GetStreamFromContext,'+E.Message);
END;
End;

// Trys to close a server connection safely
Procedure TForm1.TryCloseServerConnection(AContext: TIdContext; closemsg:string='');
Begin
Expand Down Expand Up @@ -2559,6 +2573,24 @@ procedure TForm1.IdTCPServer1Execute(AContext: TIdContext);
ToLog('nodeftp','Uploaded GVTs to '+IPUser+' at '+FTPSpeed.ToString+' kb/s');
end // SENDING GVTS FILE

else if parameter(LLine,0) = 'PSOSFILE' then
begin
DownloadPSOs := true;
MemStream := TMemoryStream.Create;
if GetStreamFromContext(Acontext,MemStream) then
begin
if SavePSOsToFile(MemStream) then
begin
LoadPSOFileFromDisk;
UpdateMyData();
ToLog('console','PSOs file received on server');
end;
end;
MemStream.Free;
DownloadPSOs := false;
LasTimePSOsRequest := 0;
end

else if AnsiContainsStr(ValidProtocolCommands,Uppercase(parameter(LLine,4))) then
begin
TRY
Expand Down
8 changes: 4 additions & 4 deletions mpparser.pas
Original file line number Diff line number Diff line change
Expand Up @@ -797,10 +797,10 @@ function SendFunds(LineText:string;showOutput:boolean=true):string;
end;
Setlength(orderstring,length(orderstring)-2);
OrderString := StringReplace(OrderString,'PSK','NSLORDER',[]);
ToLog('console','Send to Node '+OrderString);
//result := SendOrderToNode(OrderString);
//ToLog('console','Send to Node '+OrderString);
result := SendOrderToNode(OrderString);
ToLog('console','Node result: '+result);
//OutgoingMsjsAdd(OrderString);
OutgoingMsjsAdd(OrderString);
EndPerformance('SendFunds');
end // End procesar
else
Expand Down Expand Up @@ -1487,7 +1487,7 @@ function ShowPrivKey(linea:String;ToConsole:boolean = false):String;
Randomize;
for contador := 1 to numero do
begin
Monto := 100000+contador;
Monto := 1000000+contador;
ProcesslinesAdd('SENDTO devteam_donations '+IntToStr(Monto)+' '+contador.ToString);
end;
end;
Expand Down
2 changes: 1 addition & 1 deletion releasenotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 0.4.2 Cb2
Version 0.4.2 Cb3

Not mandatory.
Provide services update to use built-in database and includes RPC method to submit orders directly to mainnet.
Expand Down

0 comments on commit 740ad8c

Please sign in to comment.