ソースを参照

Merge branch 'master' into Releases/4.0.3

PascalCoin 6 年 前
コミット
bbb3cfdf88

+ 1 - 1
PIP/PIP-0030.md

@@ -26,7 +26,7 @@ To improve this, first consider that how PascalCoin works. Users own accounts (P
 
 It is proposed by this PIP to change the SafeBoxHash algorithm to be a **merkle-root of the Account Segments**.This is to be called the SafeBoxRoot and marked SR in below diagram.
 
-![PASA Seals](resources/PIP-0030/SafeBoxRoot-Diagram.png)
+![PASA Seals](resources/PIP-0030/SafeBoxRoot-Diagram.drawio.png)
 
 By changing the SafeBoxHash to be the SafeBoxRoot, it becomes possible for light-clients to cryptographically prove the validity of an Account Segment **without** the SafeBox. The benefits of this capability include:
 

BIN
PIP/resources/PIP-0030/SafeBoxRoot-Diagram.drawio.jpg


BIN
PIP/resources/PIP-0030/SafeBoxRoot-Diagram.drawio.png


ファイルの差分が大きいため隠しています
+ 0 - 0
PIP/resources/PIP-0030/SafeBoxRoot-Diagram.drawio.xml


BIN
PIP/resources/PIP-0030/SafeBoxRoot-Diagram.jpg


BIN
PIP/resources/PIP-0030/SafeBoxRoot-Diagram.png


BIN
PIP/resources/PIP-0030/SafeBoxRoot-Example-Proof-1.drawio.jpg


BIN
PIP/resources/PIP-0030/SafeBoxRoot-Example-Proof-1.drawio.png


ファイルの差分が大きいため隠しています
+ 0 - 0
PIP/resources/PIP-0030/SafeBoxRoot-Example-Proof-1.drawio.xml


BIN
PIP/resources/PIP-0030/SafeBoxRoot-Example-Proof-2.drawio.jpg


BIN
PIP/resources/PIP-0030/SafeBoxRoot-Example-Proof-2.drawio.png


ファイルの差分が大きいため隠しています
+ 0 - 0
PIP/resources/PIP-0030/SafeBoxRoot-Example-Proof-2.drawio.xml


+ 8 - 1
src/core/URPC.pas

@@ -27,7 +27,10 @@ interface
 Uses UThread, ULog, UConst, UNode, UAccounts, UCrypto, UBlockChain,
   UNetProtocol, UOpTransaction, UWallet, UTime, UPCEncryption, UTxMultiOperation,
   UJSONFunctions, classes, blcksock, synsock,
-  IniFiles, Variants, math, UBaseTypes, UOpenSSL,
+  IniFiles, Variants, math, UBaseTypes,
+  {$IFDEF Use_OpenSSL}
+  UOpenSSL,
+  {$ENDIF}
   UPCOrderedLists, UPCDataTypes,
   {$IFNDEF FPC}System.Generics.Collections{$ELSE}Generics.Collections{$ENDIF},
   UNetProtection;
@@ -940,6 +943,7 @@ function TRPCProcess.ProcessMethod(const method: String; params: TPCJSONObject;
 
   Function CheckAndGetEncodedRAWPayload(Const RawPayload : TRawBytes; Const Payload_method, EncodePwdForAES : String; const senderAccounKey, targetAccountKey : TAccountKey; var EncodedRAWPayload : TRawBytes) : Boolean;
   begin
+    Result := False;
     if (length(RawPayload)>0) then begin
       if (Payload_method='none') then EncodedRAWPayload:=RawPayload
       else if (Payload_method='dest') then begin
@@ -954,6 +958,7 @@ function TRPCProcess.ProcessMethod(const method: String; params: TPCJSONObject;
         exit;
       end;
     end else EncodedRAWPayload := Nil;
+    Result := True;
   end;
 
   // This function creates a TOpTransaction without looking for balance/private key of sender account
@@ -3426,7 +3431,9 @@ begin
     GetResultObject.GetAsObject('netstats').GetAsVariant('tservers').Value:=TNetData.NetData.NetStatistics.TotalServersConnections;
     GetResultObject.GetAsObject('netstats').GetAsVariant('breceived').Value:=TNetData.NetData.NetStatistics.BytesReceived;
     GetResultObject.GetAsObject('netstats').GetAsVariant('bsend').Value:=TNetData.NetData.NetStatistics.BytesSend;
+    {$IFDEF Use_OpenSSL}
     GetResultObject.GetAsVariant('openssl').Value := IntToHex(OpenSSLVersion,8);
+    {$ENDIF}
     nsaarr := TNetData.NetData.NodeServersAddresses.GetValidNodeServers(true,20);
     for i := low(nsaarr) to High(nsaarr) do begin
       jso := GetResultObject.GetAsArray('nodeservers').GetAsObject(i);

+ 6 - 2
src/gui-classic/UFRMAbout.pas

@@ -63,7 +63,11 @@ uses
   ShellApi,
 {$ELSE}
 {$ENDIF}
-  UFolderHelper, UConst, UNode, UOpenSSL;
+  UFolderHelper, UConst,
+{$IFDEF Use_OpenSSL}
+  UOpenSSL,
+{$ENDIF}
+  UNode;
 
 {$IFnDEF FPC}
   {$R *.dfm}
@@ -73,7 +77,7 @@ uses
 
 procedure TFRMAbout.FormCreate(Sender: TObject);
 begin
-  lblBuild.Caption :=  'Build: '+CT_ClientAppVersion+' OpenSSL: '+IntToHex(OpenSSLVersion,8)+' Compiler: '{$IFDEF FPC}+'FPC'{$IFDEF CPU32}+' 32b'{$ELSE}+' 64b'{$ENDIF}{$ELSE}+'Delphi'{$IFDEF CPU32BITS}+' 32b'{$ELSE}+' 64b'{$ENDIF}{$ENDIF};
+  lblBuild.Caption :=  'Build: '+CT_ClientAppVersion+' OpenSSL: '+{$IFDEF Use_OpenSSL}IntToHex(OpenSSLVersion,8){$ELSE}'NONE'{$ENDIF}+' Compiler: '{$IFDEF FPC}+'FPC'{$IFDEF CPU32}+' 32b'{$ELSE}+' 64b'{$ENDIF}{$ELSE}+'Delphi'{$IFDEF CPU32BITS}+' 32b'{$ELSE}+' 64b'{$ENDIF}{$ENDIF};
   lblProtocolVersion.Caption := Format('BlockChain Protocol: %d (%d)  -  Net Protocol: %d (%d)',[TNode.Node.Bank.SafeBox.CurrentProtocol,CT_BlockChain_Protocol_Available,
     CT_NetProtocol_Version, CT_NetProtocol_Available]);
 end;

+ 7 - 1
src/gui-classic/UFRMWallet.pas

@@ -322,7 +322,11 @@ implementation
   {$R *.lfm}
 {$ENDIF}
 
-Uses UFolderHelper, UOpenSSL, UTime, UFileStorage,
+Uses UFolderHelper,
+{$IFDEF Use_OpenSSL}
+  UOpenSSL,
+{$ENDIF}
+  UTime, UFileStorage,
   UThread, UOpTransaction, UFRMPascalCoinWalletConfig,
   UFRMOperationsExplorer,
   {$IFDEF TESTNET}
@@ -405,7 +409,9 @@ begin
   FIsActivated := true;
   try
     // Check OpenSSL dll
+{$IFDEF Use_OpenSSL}
     if Not LoadSSLCrypt then raise Exception.Create('Cannot load '+SSL_C_LIB+#10+'To use this software make sure this file is available on you system or reinstall the application');
+{$ENDIF}
     TCrypto.InitCrypto;
     // Read Wallet
     Try

+ 4 - 2
src/pascalcoin_wallet_classic.dpr

@@ -15,19 +15,21 @@ uses
   Forms,
   UAccountKeyStorage in 'core\UAccountKeyStorage.pas',
   UAccounts in 'core\UAccounts.pas',
+  {$IFDEF Use_OpenSSL}
   UAES in 'core\UAES.pas',
+  UECIES in 'core\UECIES.pas',
+  UOpenSSL in 'core\UOpenSSL.pas',
+  {$ENDIF}
   UBaseTypes in 'core\UBaseTypes.pas',
   UBlockChain in 'core\UBlockChain.pas',
   UChunk in 'core\UChunk.pas',
   UConst in 'core\UConst.pas',
   UCrypto in 'core\UCrypto.pas',
-  UECIES in 'core\UECIES.pas',
   UFileStorage in 'core\UFileStorage.pas',
   ULog in 'core\ULog.pas',
   UNetProtection in 'core\UNetProtection.pas',
   UNetProtocol in 'core\UNetProtocol.pas',
   UNode in 'core\UNode.pas',
-  UOpenSSL in 'core\UOpenSSL.pas',
   UOpTransaction in 'core\UOpTransaction.pas',
   UPoolMinerThreads in 'core\UPoolMinerThreads.pas',
   UPoolMining in 'core\UPoolMining.pas',

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません