diff --git a/lastrelease.txt b/lastrelease.txt index 4803b09..c4cfb1f 100644 --- a/lastrelease.txt +++ b/lastrelease.txt @@ -1 +1 @@ -0.4.2Cb2 0.4.2Cb2 x {LastOfficial} {LastBeta} {TestNet} \ No newline at end of file +0.4.2Cb3 0.4.2Cb3 x {LastOfficial} {LastBeta} {TestNet} \ No newline at end of file diff --git a/masterpaskalform.pas b/masterpaskalform.pas index 47d66a3..b4a57a3 100644 --- a/masterpaskalform.pas +++ b/masterpaskalform.pas @@ -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; @@ -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'; @@ -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 @@ -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 diff --git a/mpparser.pas b/mpparser.pas index 0b46895..afaa4d7 100644 --- a/mpparser.pas +++ b/mpparser.pas @@ -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 @@ -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; diff --git a/releasenotes.txt b/releasenotes.txt index 88f79ff..4a95e93 100644 --- a/releasenotes.txt +++ b/releasenotes.txt @@ -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.