Browse Source

RandomHash2: compilation fixes

Herman Schoenfeld 6 years ago
parent
commit
a25e58aee9

+ 3 - 4
src/gui-classic/UFRMDiagnosticTool.pas

@@ -82,7 +82,6 @@ constructor TAlgorithmThread.Create;
 begin
   Inherited Create(True);
   SetLength(FLastHash, 32);
-  FillChar(FLastHash, 32, 0);
 end;
 
 procedure TAlgorithmThread.BCExecute;
@@ -97,7 +96,7 @@ begin
   while True do begin
    FLastHash := NextRound;
    inc(LTotalHashes);
-   if TPlatform.GetElapsedMilliseconds(LTC)>1000 then begin
+   if TPlatform.GetElapsedMilliseconds(LTC)>2500 then begin
      FNotifyDuration := TTimeSpan.Subtract(Now, LStartTime);
      FNotifyHashCount := LTotalHashes;
      Queue( ThreadSafeNotify );
@@ -139,15 +138,15 @@ end;
 
 function TRandomHash2Thread.NextRound : TBytes;
 begin
-   Result := FHasher.Hash(FLastHash);
+  Result := FHasher.Hash(FLastHash);
 end;
 
 { TFRMDiagnosicTool }
 
 procedure TFRMDiagnosticTool.FormCreate(Sender: TObject);
 begin
-  FRHThread := TRandomHashThread.Create;
   FRH2Thread := TRandomHash2Thread.Create;
+  FRHThread := TRandomHashThread.Create;
   FDisposables.AddObject(FRHThread);
   FDisposables.AddObject(FRH2Thread);
 

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

@@ -1,4 +1,4 @@
-unit UFRMDiagnosticTool;
+unit UFRMRandomHashUtil;
 
 interface
 

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

@@ -331,7 +331,7 @@ Uses UFolderHelper,
 {$ENDIF}
   UTime, UFileStorage,
   UThread, UOpTransaction, UFRMPascalCoinWalletConfig,
-  UFRMOperationsExplorer, UFRMRandomHashUtil,
+  UFRMOperationsExplorer, UFRMDiagnosticTool,
   {$IFDEF TESTNET}
   UFRMRandomOperations,
   UPCTNetDataExtraMessages,
@@ -1617,9 +1617,9 @@ end;
 
 procedure TFRMWallet.miDiagnosticToolClick(Sender: TObject);
 var
- LDialog : TFRMDiagnosicTool;
+ LDialog : TFRMDiagnosticTool;
 begin
-  LDialog := TFRMDiagnosicTool.Create(Nil);
+  LDialog := TFRMDiagnosticTool.Create(Nil);
   try
     LDialog.ShowModal;
   finally

+ 1 - 1
src/pascalcoin_wallet_classic.dpr

@@ -61,7 +61,7 @@ uses
   UPCTNetDataExtraMessages in 'core\UPCTNetDataExtraMessages.pas',
   UFRMHashLock in 'gui-classic\UFRMHashLock.pas' {FRMHashLock},
   URandomHash2 in 'core\URandomHash2.pas',
-  UFRMRandomHashUtil in 'gui-classic\UFRMRandomHashUtil.pas' {FRMDiagnosicTool};
+  UFRMDiagnosticTool in 'gui-classic\UFRMDiagnosticTool.pas' {FRMDiagnosticTool};
 
 {$R *.res}
 

+ 2 - 2
src/pascalcoin_wallet_classic.dproj

@@ -220,8 +220,8 @@
             <FormType>dfm</FormType>
         </DCCReference>
         <DCCReference Include="core\URandomHash2.pas"/>
-        <DCCReference Include="gui-classic\UFRMRandomHashUtil.pas">
-            <Form>FRMDiagnosicTool</Form>
+        <DCCReference Include="gui-classic\UFRMDiagnosticTool.pas">
+            <Form>FRMDiagnosticTool</Form>
             <FormType>dfm</FormType>
         </DCCReference>
         <BuildConfiguration Include="Debug">