Browse Source

PIP-0041: PayToKey integration into GUI

Herman Schoenfeld 4 years ago
parent
commit
dcb22d8707

+ 2 - 0
src/core/UNode.pas

@@ -887,6 +887,8 @@ begin
   end else if (AEPasa.IsAddressedByName) then begin
   end else if (AEPasa.IsAddressedByName) then begin
     // Find account by name
     // Find account by name
     AResolvedAccount := Bank.SafeBox.FindAccountByName(AEPasa.AccountName);
     AResolvedAccount := Bank.SafeBox.FindAccountByName(AEPasa.AccountName);
+    AResolvedKey := CT_Account_NUL.accountInfo.accountKey;
+    ARequiresPurchase := False;
     if AResolvedAccount < 0 then begin
     if AResolvedAccount < 0 then begin
       // No account with name found
       // No account with name found
       AResolvedAccount := CT_AccountNo_NUL;
       AResolvedAccount := CT_AccountNo_NUL;

+ 1 - 1
src/core/USettings.pas

@@ -395,7 +395,7 @@ end;
 class function TSettings.GetMaxPayToKeyPurchasePrice : UInt64;
 class function TSettings.GetMaxPayToKeyPurchasePrice : UInt64;
 begin
 begin
   CheckLoaded;
   CheckLoaded;
-  Result := FAppParams.ParamByName[CT_PARAM_MaxPayToKeyPurchasePrice].GetAsUInt64(5000);
+  Result := FAppParams.ParamByName[CT_PARAM_MaxPayToKeyPurchasePrice].GetAsUInt64(CT_DEFAULT_PAY_TO_KEY_MAX_MOLINAS);
 end;
 end;
 
 
 class procedure TSettings.SetMaxPayToKeyPurchasePrice(AVal: UInt64);
 class procedure TSettings.SetMaxPayToKeyPurchasePrice(AVal: UInt64);

+ 9 - 4
src/gui-classic/UFRMOperation.dfm

@@ -295,11 +295,14 @@ object FRMOperation: TFRMOperation
         Top = 7
         Top = 7
         Width = 524
         Width = 524
         Height = 204
         Height = 204
-        ActivePage = tsBuyAccount
+        ActivePage = tsTransaction
         TabOrder = 0
         TabOrder = 0
         OnChange = PageControlOpTypeChange
         OnChange = PageControlOpTypeChange
         object tsTransaction: TTabSheet
         object tsTransaction: TTabSheet
           Caption = 'Transaction'
           Caption = 'Transaction'
+          DesignSize = (
+            516
+            176)
           object lblDestAccount: TLabel
           object lblDestAccount: TLabel
             Left = 13
             Left = 13
             Top = 32
             Top = 32
@@ -335,10 +338,11 @@ object FRMOperation: TFRMOperation
             ParentFont = False
             ParentFont = False
           end
           end
           object sbSearchDestinationAccount: TSpeedButton
           object sbSearchDestinationAccount: TSpeedButton
-            Left = 208
+            Left = 490
             Top = 29
             Top = 29
             Width = 23
             Width = 23
             Height = 22
             Height = 22
+            Anchors = [akTop, akRight]
             Glyph.Data = {
             Glyph.Data = {
               36030000424D3603000000000000360000002800000010000000100000000100
               36030000424D3603000000000000360000002800000010000000100000000100
               18000000000000030000120B0000120B00000000000000000000FF00FF4A667C
               18000000000000030000120B0000120B00000000000000000000FF00FF4A667C
@@ -369,10 +373,11 @@ object FRMOperation: TFRMOperation
             OnClick = sbSearchDestinationAccountClick
             OnClick = sbSearchDestinationAccountClick
           end
           end
           object ebDestAccount: TEdit
           object ebDestAccount: TEdit
-            Left = 115
+            Left = 114
             Top = 29
             Top = 29
-            Width = 87
+            Width = 370
             Height = 21
             Height = 21
+            Anchors = [akLeft, akTop, akRight]
             TabOrder = 0
             TabOrder = 0
           end
           end
           object ebAmount: TEdit
           object ebAmount: TEdit

+ 45 - 31
src/gui-classic/UFRMOperation.pas

@@ -167,7 +167,7 @@ type
     Function UpdateFee(var Fee : Int64; errors : String) : Boolean;
     Function UpdateFee(var Fee : Int64; errors : String) : Boolean;
     Function UpdateOperationOptions(var errors : String) : Boolean;
     Function UpdateOperationOptions(var errors : String) : Boolean;
     Function UpdatePayload(Const SenderAccount : TAccount; var errors : String) : Boolean;
     Function UpdatePayload(Const SenderAccount : TAccount; var errors : String) : Boolean;
-    Function UpdateOpTransaction(Const SenderAccount : TAccount; var DestAccount : TAccount; var amount : Int64; var errors : String) : Boolean;
+    Function UpdateOpTransaction(const SenderAccount: TAccount; out DestAccount : TAccount; out AResolvedKey : TAccountKey; out ARequiresPurchase : Boolean; out amount: Int64; out errors: String) : Boolean;
     Function UpdateOpChangeKey(Const TargetAccount : TAccount; var SignerAccount : TAccount; var NewPublicKey : TAccountKey; var errors : String) : Boolean;
     Function UpdateOpChangeKey(Const TargetAccount : TAccount; var SignerAccount : TAccount; var NewPublicKey : TAccountKey; var errors : String) : Boolean;
     Function UpdateOpListAccount(Const TargetAccount : TAccount; var SalePrice : Int64; var SellerAccount,SignerAccount : TAccount; var NewOwnerPublicKey : TAccountKey; var LockedUntilBlock : Cardinal; var HashLock : T32Bytes; var errors : String) : Boolean;
     Function UpdateOpListAccount(Const TargetAccount : TAccount; var SalePrice : Int64; var SellerAccount,SignerAccount : TAccount; var NewOwnerPublicKey : TAccountKey; var LockedUntilBlock : Cardinal; var HashLock : T32Bytes; var errors : String) : Boolean;
     Function UpdateOpDelist(Const TargetAccount : TAccount; var SignerAccount : TAccount; var errors : String) : Boolean;
     Function UpdateOpDelist(Const TargetAccount : TAccount; var SignerAccount : TAccount; var errors : String) : Boolean;
@@ -192,7 +192,7 @@ implementation
 
 
 uses
 uses
   {$IFDEF USE_GNUGETTEXT}gnugettext,{$ENDIF}UConst, UOpTransaction, UFRMNewPrivateKeyType, UFRMWalletKeys, UFRMHashLock,
   {$IFDEF USE_GNUGETTEXT}gnugettext,{$ENDIF}UConst, UOpTransaction, UFRMNewPrivateKeyType, UFRMWalletKeys, UFRMHashLock,
-  UCommon, ULog, UGUIUtils;
+  UCommon, UEPasa, ULog, UGUIUtils;
 
 
 {$IFnDEF FPC}
 {$IFnDEF FPC}
   {$R *.dfm}
   {$R *.dfm}
@@ -218,7 +218,7 @@ Var errors : String;
   LHashLock : T32Bytes;
   LHashLock : T32Bytes;
   _newName, LNewAccountData : TRawBytes;
   _newName, LNewAccountData : TRawBytes;
   _newType : Word;
   _newType : Word;
-  _changeName, _changeType, LChangeAccountData, _V2, _executeSigner, LRecipientSigned : Boolean;
+  _changeName, _changeType, LChangeAccountData, _V2, _executeSigner, LRecipientSigned, LRequiresPurchase : Boolean;
   _senderAccounts : TCardinalsArray;
   _senderAccounts : TCardinalsArray;
 label loop_start;
 label loop_start;
 begin
 begin
@@ -262,7 +262,8 @@ loop_start:
       // Determine which operation type it is
       // Determine which operation type it is
       if PageControlOpType.ActivePage = tsTransaction then begin
       if PageControlOpType.ActivePage = tsTransaction then begin
         {%region Operation: Transaction}
         {%region Operation: Transaction}
-        if Not UpdateOpTransaction(account,destAccount,_amount,errors) then raise Exception.Create(errors);
+        if Not UpdateOpTransaction(account,destAccount,_newOwnerPublicKey, LRequiresPurchase, _amount,errors) then
+        raise Exception.Create(errors);
         if Length(_senderAccounts) > 1 then begin
         if Length(_senderAccounts) > 1 then begin
           if account.balance>0 then begin
           if account.balance>0 then begin
             if account.balance>DefaultFee then begin
             if account.balance>DefaultFee then begin
@@ -273,14 +274,19 @@ loop_start:
               _fee := 0;
               _fee := 0;
             end;
             end;
           end else dooperation := false;
           end else dooperation := false;
-        end else begin
         end;
         end;
+
         if dooperation then begin
         if dooperation then begin
-          op := TOpTransaction.CreateTransaction(FNode.Bank.Safebox.CurrentProtocol,account.account,account.n_operation+1,destAccount.account,LKey.PrivateKey,_amount,_fee,FEncodedPayload);
-          inc(_totalamount,_amount);
-          inc(_totalfee,_fee);
+          if NOT LRequiresPurchase then begin
+            op := TOpTransaction.CreateTransaction(FNode.Bank.Safebox.CurrentProtocol,account.account,account.n_operation+1,destAccount.account,LKey.PrivateKey,_amount,_fee,FEncodedPayload);
+            operationstxt := 'Transaction to '+TAccountComp.AccountNumberToAccountTxtNumber(destAccount.account);
+          end else begin
+            // Pay-to-Key
+            op := TOpBuyAccount.CreateBuy(FNode.Bank.SafeBox.CurrentProtocol, account.account, account.n_operation + 1, destAccount.account, destAccount.accountInfo.account_to_pay, destAccount.accountInfo.price, _amount, _fee, _newOwnerPublicKey, LKey.PrivateKey, FEncodedPayload);
+          end;
+         inc(_totalamount,_amount);
+         inc(_totalfee,_fee);
         end;
         end;
-        operationstxt := 'Transaction to '+TAccountComp.AccountNumberToAccountTxtNumber(destAccount.account);
         {%endregion}
         {%endregion}
       end else if (PageControlOpType.ActivePage = tsChangePrivateKey) then begin
       end else if (PageControlOpType.ActivePage = tsChangePrivateKey) then begin
         {%region Operation: Change Private Key}
         {%region Operation: Change Private Key}
@@ -467,14 +473,14 @@ begin
 end;
 end;
 
 
 procedure TFRMOperation.ebAccountNumberExit(Sender: TObject);
 procedure TFRMOperation.ebAccountNumberExit(Sender: TObject);
-Var an : Cardinal;
+Var LEPasa : TEPASA;
   eb : TEdit;
   eb : TEdit;
 begin
 begin
   if (Not assigned(Sender)) then exit;
   if (Not assigned(Sender)) then exit;
   if (Not (Sender is TEdit)) then exit;
   if (Not (Sender is TEdit)) then exit;
   eb := TEdit(Sender);
   eb := TEdit(Sender);
-  If TAccountComp.AccountTxtNumberToAccountNumber(eb.Text,an) then begin
-    eb.Text := TAccountComp.AccountNumberToAccountTxtNumber(an);
+  If TEPasa.TryParse(eb.Text,LEPasa) then begin
+    eb.Text := LEPasa.ToString();
   end else begin
   end else begin
     eb.Text := '';
     eb.Text := '';
   end;
   end;
@@ -1147,6 +1153,7 @@ Var
   changeName,changeType, LRecipientSigned, LChangeAccountData : Boolean;
   changeName,changeType, LRecipientSigned, LChangeAccountData : Boolean;
   newName, LNewAccountData : TRawBytes;
   newName, LNewAccountData : TRawBytes;
   newType : Word;
   newType : Word;
+  LRequiresPurchase : Boolean;
 begin
 begin
   Result := false;
   Result := false;
   sender_account := CT_Account_NUL;
   sender_account := CT_Account_NUL;
@@ -1212,7 +1219,7 @@ begin
     end;
     end;
   End;
   End;
   if (PageControlOpType.ActivePage = tsTransaction) then begin
   if (PageControlOpType.ActivePage = tsTransaction) then begin
-    Result := UpdateOpTransaction(GetDefaultSenderAccount,dest_account,amount,errors);
+    Result := UpdateOpTransaction(GetDefaultSenderAccount,dest_account, publicKey, LRequiresPurchase, amount,errors);
   end else if (PageControlOpType.ActivePage = tsChangePrivateKey) then begin
   end else if (PageControlOpType.ActivePage = tsChangePrivateKey) then begin
     Result := UpdateOpChangeKey(GetDefaultSenderAccount,signer_account,publicKey,errors);
     Result := UpdateOpChangeKey(GetDefaultSenderAccount,signer_account,publicKey,errors);
   end else if (PageControlOpType.ActivePage = tsListAccount) then begin
   end else if (PageControlOpType.ActivePage = tsListAccount) then begin
@@ -1508,44 +1515,51 @@ begin
   End;
   End;
 end;
 end;
 
 
-function TFRMOperation.UpdateOpTransaction(const SenderAccount: TAccount;  var DestAccount: TAccount; var amount: Int64;  var errors: String): Boolean;
-Var c : Cardinal;
+function TFRMOperation.UpdateOpTransaction(const SenderAccount: TAccount; out DestAccount : TAccount; out AResolvedKey : TECDSA_Public; out ARequiresPurchase : Boolean; out amount: Int64; out errors: String): Boolean;
+Var
+  LEPasa : TEPasa;
+  LResolvedAccountNo : Cardinal;
 begin
 begin
-  Result := False;
   errors := '';
   errors := '';
   lblTransactionErrors.Caption := '';
   lblTransactionErrors.Caption := '';
   if PageControlOpType.ActivePage<>tsTransaction then exit;
   if PageControlOpType.ActivePage<>tsTransaction then exit;
-  if not (TAccountComp.AccountTxtNumberToAccountNumber(ebDestAccount.Text,c)) then begin
-    errors := 'Invalid dest. account ('+ebDestAccount.Text+')';
+  if not TEPasa.TryParse(ebDestAccount.Text, LEPasa) then begin
+    errors := 'Invalid dest. EPASA ('+ebDestAccount.Text+')';
     lblTransactionErrors.Caption := errors;
     lblTransactionErrors.Caption := errors;
-    exit;
+    Exit(False);
   end;
   end;
-  if (c<0) Or (c>=TNode.Node.Bank.AccountsCount) then begin
-    errors := 'Invalid dest. account ('+TAccountComp.AccountNumberToAccountTxtNumber(c)+')';
+
+  Result := TNode.Node.TryResolveEPASA(LEPasa, LResolvedAccountNo, AResolvedKey, ARequiresPurchase, errors);
+  if NOT Result then begin
     lblTransactionErrors.Caption := errors;
     lblTransactionErrors.Caption := errors;
-    exit;
+    Exit(False);
+  end;
+
+  if LResolvedAccountNo <> CT_AccountNo_NUL then begin
+    DestAccount := TNode.Node.GetMempoolAccount(LResolvedAccountNo);
+    if DestAccount.account=SenderAccount.account then begin
+      errors := 'Sender and dest account are the same';
+      lblTransactionErrors.Caption := errors;
+      Exit(False);
+    end;
   end;
   end;
-  DestAccount := TNode.Node.GetMempoolAccount(c);
+
   if SenderAccounts.Count=1 then begin
   if SenderAccounts.Count=1 then begin
     if not TAccountComp.TxtToMoney(ebAmount.Text,amount) then begin
     if not TAccountComp.TxtToMoney(ebAmount.Text,amount) then begin
       errors := 'Invalid amount ('+ebAmount.Text+')';
       errors := 'Invalid amount ('+ebAmount.Text+')';
       lblTransactionErrors.Caption := errors;
       lblTransactionErrors.Caption := errors;
-      exit;
+      Exit(False);
     end;
     end;
   end else amount := 0; // ALL BALANCE
   end else amount := 0; // ALL BALANCE
-  if DestAccount.account=SenderAccount.account then begin
-    errors := 'Sender and dest account are the same';
-    lblTransactionErrors.Caption := errors;
-    exit;
-  end;
+
+
   if (SenderAccounts.Count=1) then begin
   if (SenderAccounts.Count=1) then begin
     if (SenderAccount.balance<(amount+FDefaultFee)) then begin
     if (SenderAccount.balance<(amount+FDefaultFee)) then begin
        errors := 'Insufficient funds';
        errors := 'Insufficient funds';
        lblTransactionErrors.Caption := errors;
        lblTransactionErrors.Caption := errors;
-       exit;
+       Exit(False);
     end;
     end;
   end;
   end;
-  Result := True;
 end;
 end;
 
 
 function TFRMOperation.UpdatePayload(const SenderAccount: TAccount;
 function TFRMOperation.UpdatePayload(const SenderAccount: TAccount;

+ 3 - 3
src/gui-classic/UFRMPascalCoinWalletConfig.pas

@@ -97,7 +97,7 @@ type
 implementation
 implementation
 
 
 uses
 uses
-  {$IFDEF USE_GNUGETTEXT}gnugettext, UFRMSelectLanguage, {$ENDIF}UConst, UAccounts, ULog, UCrypto, UNode, USettings, UGUIUtils, UNetProtocol;
+  {$IFDEF USE_GNUGETTEXT}gnugettext, UFRMSelectLanguage, {$ENDIF}UConst, UAccounts, ULog, UCrypto, UNode, UGUIUtils, UNetProtocol;
 
 
 {$IFnDEF FPC}
 {$IFnDEF FPC}
   {$R *.dfm}
   {$R *.dfm}
@@ -107,7 +107,7 @@ uses
 
 
 procedure TFRMPascalCoinWalletConfig.bbOkClick(Sender: TObject);
 procedure TFRMPascalCoinWalletConfig.bbOkClick(Sender: TObject);
 Var df : Int64;
 Var df : Int64;
-  mpk : TMinerPrivateKey;
+  mpk : TMinerPrivateKeyType;
   i : Integer;
   i : Integer;
 begin
 begin
   if udInternetServerPort.Position = udJSONRPCMinerServerPort.Position then raise Exception.Create('Server port and JSON-RPC Server miner port are equal!');
   if udInternetServerPort.Position = udJSONRPCMinerServerPort.Position then raise Exception.Create('Server port and JSON-RPC Server miner port are equal!');
@@ -240,7 +240,7 @@ begin
     udInternetServerPort.Position := AppParams.ParamByName[CT_PARAM_InternetServerPort].GetAsInteger(CT_NetServer_Port);
     udInternetServerPort.Position := AppParams.ParamByName[CT_PARAM_InternetServerPort].GetAsInteger(CT_NetServer_Port);
     ebDefaultFee.Text := TAccountComp.FormatMoney(AppParams.ParamByName[CT_PARAM_DefaultFee].GetAsInt64(0));
     ebDefaultFee.Text := TAccountComp.FormatMoney(AppParams.ParamByName[CT_PARAM_DefaultFee].GetAsInt64(0));
     cbJSONRPCMinerServerActive.Checked := AppParams.ParamByName[CT_PARAM_JSONRPCMinerServerActive].GetAsBoolean(true);
     cbJSONRPCMinerServerActive.Checked := AppParams.ParamByName[CT_PARAM_JSONRPCMinerServerActive].GetAsBoolean(true);
-    case TMinerPrivateKey(AppParams.ParamByName[CT_PARAM_MinerPrivateKeyType].GetAsInteger(Integer(mpk_Random))) of
+    case TMinerPrivateKeyType(AppParams.ParamByName[CT_PARAM_MinerPrivateKeyType].GetAsInteger(Integer(mpk_Random))) of
       mpk_NewEachTime : rbGenerateANewPrivateKeyEachBlock.Checked := true;
       mpk_NewEachTime : rbGenerateANewPrivateKeyEachBlock.Checked := true;
       mpk_Random : rbUseARandomKey.Checked := true;
       mpk_Random : rbUseARandomKey.Checked := true;
       mpk_Selected : rbMineAllwaysWithThisKey.Checked := true;
       mpk_Selected : rbMineAllwaysWithThisKey.Checked := true;

+ 1 - 1
src/gui-classic/UGridUtils.pas

@@ -31,7 +31,7 @@ uses
   LCLIntf, LCLType, LMessages,
   LCLIntf, LCLType, LMessages,
 {$ENDIF}
 {$ENDIF}
   Classes, Grids, UNode, UAccounts, UBlockChain, UAppParams, UThread, UPCDataTypes,
   Classes, Grids, UNode, UAccounts, UBlockChain, UAppParams, UThread, UPCDataTypes,
-  UWallet, UCrypto, UPoolMining, URPC, UBaseTypes, UPCOrderedLists,
+  UWallet, UCrypto, UPoolMining, URPC, UBaseTypes, UPCOrderedLists, USettings,
   {$IFNDEF FPC}System.Generics.Collections{$ELSE}Generics.Collections{$ENDIF};
   {$IFNDEF FPC}System.Generics.Collections{$ELSE}Generics.Collections{$ENDIF};
 
 
 Type
 Type

+ 49 - 32
src/pascalcoin_wallet_classic.dpr

@@ -15,25 +15,71 @@ uses
   Interfaces,
   Interfaces,
   {$ENDIF }
   {$ENDIF }
   Forms,
   Forms,
+  UFRMAbout in 'gui-classic\UFRMAbout.pas' {FRMAbout},
+  UFRMAccountSelect in 'gui-classic\UFRMAccountSelect.pas' {FRMAccountSelect},
+  UFRMMemoText in 'gui-classic\UFRMMemoText.pas' {FRMMemoText},
+  UFRMNewPrivateKeyType in 'gui-classic\UFRMNewPrivateKeyType.pas' {FRMNewPrivateKeyType},
+  UFRMNodesIp in 'gui-classic\UFRMNodesIp.pas' {FRMNodesIp},
+  UFRMOperation in 'gui-classic\UFRMOperation.pas' {FRMOperation},
+  UFRMOperationsExplorer in 'gui-classic\UFRMOperationsExplorer.pas' {FRMOperationsExplorer},
+  {$IFDEF USE_GNUGETTEXT}
+  UFRMSelectLanguage in 'gui-classic\UFRMSelectLanguage.pas' {FRMChangeLanguage},
+  {$ENDIF }
+  UFRMPascalCoinWalletConfig in 'gui-classic\UFRMPascalCoinWalletConfig.pas' {FRMPascalCoinWalletConfig},
+  UFRMPayloadDecoder in 'gui-classic\UFRMPayloadDecoder.pas' {FRMPayloadDecoder},
+  UFRMRandomOperations in 'gui-classic\UFRMRandomOperations.pas' {FRMRandomOperations},
+  UFRMRPCCalls in 'gui-classic\UFRMRPCCalls.pas' {FRMRPCCalls},
+  UFRMWallet in 'gui-classic\UFRMWallet.pas' {FRMWallet},
+  UFRMWalletKeys in 'gui-classic\UFRMWalletKeys.pas' {FRMWalletKeys},
+  UGridUtils in 'gui-classic\UGridUtils.pas',
+  UGUIUtils in 'gui-classic\UGUIUtils.pas',
+  UFRMHashLock in 'gui-classic\UFRMHashLock.pas' {FRMHashLock},
+  UFRMDiagnosticTool in 'gui-classic\UFRMDiagnosticTool.pas' {FRMDiagnosticTool},
+  UCommon in 'libraries\sphere10\UCommon.pas',
+  UMemory in 'libraries\sphere10\UMemory.pas',
   UAccountKeyStorage in 'core\UAccountKeyStorage.pas',
   UAccountKeyStorage in 'core\UAccountKeyStorage.pas',
   UAccounts in 'core\UAccounts.pas',
   UAccounts in 'core\UAccounts.pas',
-  {$IFDEF Use_OpenSSL}
   UAES in 'core\UAES.pas',
   UAES in 'core\UAES.pas',
-  {$ENDIF }
   UBaseTypes in 'core\UBaseTypes.pas',
   UBaseTypes in 'core\UBaseTypes.pas',
   UBlockChain in 'core\UBlockChain.pas',
   UBlockChain in 'core\UBlockChain.pas',
   UChunk in 'core\UChunk.pas',
   UChunk in 'core\UChunk.pas',
   UConst in 'core\UConst.pas',
   UConst in 'core\UConst.pas',
   UCrypto in 'core\UCrypto.pas',
   UCrypto in 'core\UCrypto.pas',
+  UECIES in 'core\UECIES.pas',
+  UEncoding in 'core\UEncoding.pas',
+  UEPasa in 'core\UEPasa.pas',
   UFileStorage in 'core\UFileStorage.pas',
   UFileStorage in 'core\UFileStorage.pas',
   ULog in 'core\ULog.pas',
   ULog in 'core\ULog.pas',
+  UMurMur3Fast in 'core\UMurMur3Fast.pas',
   UNetProtection in 'core\UNetProtection.pas',
   UNetProtection in 'core\UNetProtection.pas',
   UNetProtocol in 'core\UNetProtocol.pas',
   UNetProtocol in 'core\UNetProtocol.pas',
   UNode in 'core\UNode.pas',
   UNode in 'core\UNode.pas',
+  UOpenSSL in 'core\UOpenSSL.pas',
   UOpTransaction in 'core\UOpTransaction.pas',
   UOpTransaction in 'core\UOpTransaction.pas',
+  UPCAbstractMem in 'core\UPCAbstractMem.pas',
+  UPCAbstractMemAccountKeys in 'core\UPCAbstractMemAccountKeys.pas',
+  UPCAbstractMemAccounts in 'core\UPCAbstractMemAccounts.pas',
+  UPCAccountsOrdenations in 'core\UPCAccountsOrdenations.pas',
+  UPCCryptoLib4Pascal in 'core\UPCCryptoLib4Pascal.pas',
+  UPCDataTypes in 'core\UPCDataTypes.pas',
+  UPCEncryption in 'core\UPCEncryption.pas',
+  UPCHardcodedRandomHashTable in 'core\UPCHardcodedRandomHashTable.pas',
+  UPCOperationsBlockValidator in 'core\UPCOperationsBlockValidator.pas',
+  UPCOperationsSignatureValidator in 'core\UPCOperationsSignatureValidator.pas',
+  UPCOrderedLists in 'core\UPCOrderedLists.pas',
+  UPCRPCFileUtils in 'core\UPCRPCFileUtils.pas',
+  UPCRPCFindAccounts in 'core\UPCRPCFindAccounts.pas',
+  UPCRPCFindBlocks in 'core\UPCRPCFindBlocks.pas',
+  UPCRPCOpData in 'core\UPCRPCOpData.pas',
+  UPCRPCSend in 'core\UPCRPCSend.pas',
+  UPCSafeBoxRootHash in 'core\UPCSafeBoxRootHash.pas',
+  UPCTemporalAbstractMem in 'core\UPCTemporalAbstractMem.pas',
+  UPCTemporalFileStream in 'core\UPCTemporalFileStream.pas',
+  UPCTNetDataExtraMessages in 'core\UPCTNetDataExtraMessages.pas',
   UPoolMinerThreads in 'core\UPoolMinerThreads.pas',
   UPoolMinerThreads in 'core\UPoolMinerThreads.pas',
   UPoolMining in 'core\UPoolMining.pas',
   UPoolMining in 'core\UPoolMining.pas',
   URandomHash in 'core\URandomHash.pas',
   URandomHash in 'core\URandomHash.pas',
+  URandomHash2 in 'core\URandomHash2.pas',
   URPC in 'core\URPC.pas',
   URPC in 'core\URPC.pas',
   USettings in 'core\USettings.pas',
   USettings in 'core\USettings.pas',
   USha256 in 'core\USha256.pas',
   USha256 in 'core\USha256.pas',
@@ -41,36 +87,7 @@ uses
   UThread in 'core\UThread.pas',
   UThread in 'core\UThread.pas',
   UTime in 'core\UTime.pas',
   UTime in 'core\UTime.pas',
   UTxMultiOperation in 'core\UTxMultiOperation.pas',
   UTxMultiOperation in 'core\UTxMultiOperation.pas',
-  UWallet in 'core\UWallet.pas',
-  UFRMAbout in 'gui-classic\UFRMAbout.pas' {FRMAbout},
-  UFRMAccountSelect in 'gui-classic\UFRMAccountSelect.pas' {FRMAccountSelect},
-  UFRMMemoText in 'gui-classic\UFRMMemoText.pas' {FRMMemoText},
-  UFRMNewPrivateKeyType in 'gui-classic\UFRMNewPrivateKeyType.pas' {FRMNewPrivateKeyType},
-  UFRMNodesIp in 'gui-classic\UFRMNodesIp.pas' {FRMNodesIp},
-  UFRMOperation in 'gui-classic\UFRMOperation.pas' {FRMOperation},
-  UFRMOperationsExplorer in 'gui-classic\UFRMOperationsExplorer.pas' {FRMOperationsExplorer},
-  {$IFDEF USE_GNUGETTEXT}
-  UFRMSelectLanguage in 'gui-classic\UFRMSelectLanguage.pas' {FRMChangeLanguage},
-  {$ENDIF }
-  UFRMPascalCoinWalletConfig in 'gui-classic\UFRMPascalCoinWalletConfig.pas' {FRMPascalCoinWalletConfig},
-  UFRMPayloadDecoder in 'gui-classic\UFRMPayloadDecoder.pas' {FRMPayloadDecoder},
-  UFRMRandomOperations in 'gui-classic\UFRMRandomOperations.pas' {FRMRandomOperations},
-  UFRMRPCCalls in 'gui-classic\UFRMRPCCalls.pas' {FRMRPCCalls},
-  UFRMWallet in 'gui-classic\UFRMWallet.pas' {FRMWallet},
-  UFRMWalletKeys in 'gui-classic\UFRMWalletKeys.pas' {FRMWalletKeys},
-  UGridUtils in 'gui-classic\UGridUtils.pas',
-  UGUIUtils in 'gui-classic\UGUIUtils.pas',
-  UPCDataTypes in 'core\UPCDataTypes.pas',
-  UPCOrderedLists in 'core\UPCOrderedLists.pas',
-  UPCOperationsSignatureValidator in 'core\UPCOperationsSignatureValidator.pas',
-  UPCTNetDataExtraMessages in 'core\UPCTNetDataExtraMessages.pas',
-  UFRMHashLock in 'gui-classic\UFRMHashLock.pas' {FRMHashLock},
-  URandomHash2 in 'core\URandomHash2.pas',
-  UFRMDiagnosticTool in 'gui-classic\UFRMDiagnosticTool.pas' {FRMDiagnosticTool},
-  UCommon in 'libraries\sphere10\UCommon.pas',
-  UMemory in 'libraries\sphere10\UMemory.pas',
-  UEPasa in 'core\UEPasa.pas',
-  UEncoding in 'core\UEncoding.pas';
+  UWallet in 'core\UWallet.pas';
 
 
 {$R *.res}
 {$R *.res}
 
 

+ 50 - 31
src/pascalcoin_wallet_classic.dproj

@@ -125,31 +125,6 @@
         <DelphiCompile Include="$(MainSource)">
         <DelphiCompile Include="$(MainSource)">
             <MainSource>MainSource</MainSource>
             <MainSource>MainSource</MainSource>
         </DelphiCompile>
         </DelphiCompile>
-        <DCCReference Include="core\UAccountKeyStorage.pas"/>
-        <DCCReference Include="core\UAccounts.pas"/>
-        <DCCReference Include="core\UAES.pas"/>
-        <DCCReference Include="core\UBaseTypes.pas"/>
-        <DCCReference Include="core\UBlockChain.pas"/>
-        <DCCReference Include="core\UChunk.pas"/>
-        <DCCReference Include="core\UConst.pas"/>
-        <DCCReference Include="core\UCrypto.pas"/>
-        <DCCReference Include="core\UFileStorage.pas"/>
-        <DCCReference Include="core\ULog.pas"/>
-        <DCCReference Include="core\UNetProtection.pas"/>
-        <DCCReference Include="core\UNetProtocol.pas"/>
-        <DCCReference Include="core\UNode.pas"/>
-        <DCCReference Include="core\UOpTransaction.pas"/>
-        <DCCReference Include="core\UPoolMinerThreads.pas"/>
-        <DCCReference Include="core\UPoolMining.pas"/>
-        <DCCReference Include="core\URandomHash.pas"/>
-        <DCCReference Include="core\URPC.pas"/>
-        <DCCReference Include="core\USettings.pas"/>
-        <DCCReference Include="core\USha256.pas"/>
-        <DCCReference Include="core\UTCPIP.pas"/>
-        <DCCReference Include="core\UThread.pas"/>
-        <DCCReference Include="core\UTime.pas"/>
-        <DCCReference Include="core\UTxMultiOperation.pas"/>
-        <DCCReference Include="core\UWallet.pas"/>
         <DCCReference Include="gui-classic\UFRMAbout.pas">
         <DCCReference Include="gui-classic\UFRMAbout.pas">
             <Form>FRMAbout</Form>
             <Form>FRMAbout</Form>
             <FormType>dfm</FormType>
             <FormType>dfm</FormType>
@@ -201,21 +176,65 @@
         </DCCReference>
         </DCCReference>
         <DCCReference Include="gui-classic\UGridUtils.pas"/>
         <DCCReference Include="gui-classic\UGridUtils.pas"/>
         <DCCReference Include="gui-classic\UGUIUtils.pas"/>
         <DCCReference Include="gui-classic\UGUIUtils.pas"/>
-        <DCCReference Include="core\UPCDataTypes.pas"/>
-        <DCCReference Include="core\UPCOrderedLists.pas"/>
-        <DCCReference Include="core\UPCOperationsSignatureValidator.pas"/>
-        <DCCReference Include="core\UPCTNetDataExtraMessages.pas"/>
         <DCCReference Include="gui-classic\UFRMHashLock.pas">
         <DCCReference Include="gui-classic\UFRMHashLock.pas">
             <Form>FRMHashLock</Form>
             <Form>FRMHashLock</Form>
         </DCCReference>
         </DCCReference>
-        <DCCReference Include="core\URandomHash2.pas"/>
         <DCCReference Include="gui-classic\UFRMDiagnosticTool.pas">
         <DCCReference Include="gui-classic\UFRMDiagnosticTool.pas">
             <Form>FRMDiagnosticTool</Form>
             <Form>FRMDiagnosticTool</Form>
         </DCCReference>
         </DCCReference>
         <DCCReference Include="libraries\sphere10\UCommon.pas"/>
         <DCCReference Include="libraries\sphere10\UCommon.pas"/>
         <DCCReference Include="libraries\sphere10\UMemory.pas"/>
         <DCCReference Include="libraries\sphere10\UMemory.pas"/>
-        <DCCReference Include="core\UEPasa.pas"/>
+        <DCCReference Include="core\UAccountKeyStorage.pas"/>
+        <DCCReference Include="core\UAccounts.pas"/>
+        <DCCReference Include="core\UAES.pas"/>
+        <DCCReference Include="core\UBaseTypes.pas"/>
+        <DCCReference Include="core\UBlockChain.pas"/>
+        <DCCReference Include="core\UChunk.pas"/>
+        <DCCReference Include="core\UConst.pas"/>
+        <DCCReference Include="core\UCrypto.pas"/>
+        <DCCReference Include="core\UECIES.pas"/>
         <DCCReference Include="core\UEncoding.pas"/>
         <DCCReference Include="core\UEncoding.pas"/>
+        <DCCReference Include="core\UEPasa.pas"/>
+        <DCCReference Include="core\UFileStorage.pas"/>
+        <DCCReference Include="core\ULog.pas"/>
+        <DCCReference Include="core\UMurMur3Fast.pas"/>
+        <DCCReference Include="core\UNetProtection.pas"/>
+        <DCCReference Include="core\UNetProtocol.pas"/>
+        <DCCReference Include="core\UNode.pas"/>
+        <DCCReference Include="core\UOpenSSL.pas"/>
+        <DCCReference Include="core\UOpTransaction.pas"/>
+        <DCCReference Include="core\UPCAbstractMem.pas"/>
+        <DCCReference Include="core\UPCAbstractMemAccountKeys.pas"/>
+        <DCCReference Include="core\UPCAbstractMemAccounts.pas"/>
+        <DCCReference Include="core\UPCAccountsOrdenations.pas"/>
+        <DCCReference Include="core\UPCCryptoLib4Pascal.pas"/>
+        <DCCReference Include="core\UPCDataTypes.pas"/>
+        <DCCReference Include="core\UPCEncryption.pas"/>
+        <DCCReference Include="core\UPCHardcodedRandomHashTable.pas"/>
+        <DCCReference Include="core\UPCOperationsBlockValidator.pas"/>
+        <DCCReference Include="core\UPCOperationsSignatureValidator.pas"/>
+        <DCCReference Include="core\UPCOrderedLists.pas"/>
+        <DCCReference Include="core\UPCRPCFileUtils.pas"/>
+        <DCCReference Include="core\UPCRPCFindAccounts.pas"/>
+        <DCCReference Include="core\UPCRPCFindBlocks.pas"/>
+        <DCCReference Include="core\UPCRPCOpData.pas"/>
+        <DCCReference Include="core\UPCRPCSend.pas"/>
+        <DCCReference Include="core\UPCSafeBoxRootHash.pas"/>
+        <DCCReference Include="core\UPCTemporalAbstractMem.pas"/>
+        <DCCReference Include="core\UPCTemporalFileStream.pas"/>
+        <DCCReference Include="core\UPCTNetDataExtraMessages.pas"/>
+        <DCCReference Include="core\UPoolMinerThreads.pas"/>
+        <DCCReference Include="core\UPoolMining.pas"/>
+        <DCCReference Include="core\URandomHash.pas"/>
+        <DCCReference Include="core\URandomHash2.pas"/>
+        <DCCReference Include="core\URPC.pas"/>
+        <DCCReference Include="core\USettings.pas"/>
+        <DCCReference Include="core\USha256.pas"/>
+        <DCCReference Include="core\UTCPIP.pas"/>
+        <DCCReference Include="core\UThread.pas"/>
+        <DCCReference Include="core\UTime.pas"/>
+        <DCCReference Include="core\UTxMultiOperation.pas"/>
+        <DCCReference Include="core\UWallet.pas"/>
         <BuildConfiguration Include="Debug">
         <BuildConfiguration Include="Debug">
             <Key>Cfg_2</Key>
             <Key>Cfg_2</Key>
             <CfgParent>Base</CfgParent>
             <CfgParent>Base</CfgParent>