|
@@ -683,9 +683,9 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
class function TPascalCoinProtocol.CalcSafeBoxHash(ABlocksHashBuffer: TBytesBuffer; protocol_version: Integer): TRawBytes;
|
|
class function TPascalCoinProtocol.CalcSafeBoxHash(ABlocksHashBuffer: TBytesBuffer; protocol_version: Integer): TRawBytes;
|
|
-begin
|
|
|
|
- // If No buffer to hash is because it's fist block... so use Genesis: CT_Genesis_Magic_String_For_Old_Block_Hash
|
|
|
|
- if (ABlocksHashBuffer.Length=0) then Result := TPCSafebox.InitialSafeboxHash
|
|
|
|
|
|
+begin
|
|
|
|
+ // If No buffer to hash is because it's fist block... so use Genesis: CT_Genesis_Magic_String_For_Old_Block_Hash
|
|
|
|
+ if (ABlocksHashBuffer.Length=0) then Result := TPCSafebox.InitialSafeboxHash
|
|
else begin
|
|
else begin
|
|
|
|
|
|
// Protection
|
|
// Protection
|
|
@@ -2715,7 +2715,7 @@ Var
|
|
begin
|
|
begin
|
|
LPCOperationsBlockValidator := Nil;
|
|
LPCOperationsBlockValidator := Nil;
|
|
if checkAll then begin
|
|
if checkAll then begin
|
|
- LUseMultiThreadOperationsBlockValidator := TLogicalCPUCount.GetLogicalCPUCount>1;
|
|
|
|
|
|
+ LUseMultiThreadOperationsBlockValidator := TCPUTool.GetLogicalCPUCount>1;
|
|
end else LUseMultiThreadOperationsBlockValidator := False;
|
|
end else LUseMultiThreadOperationsBlockValidator := False;
|
|
If Assigned(FPreviousSafeBox) then Raise Exception.Create('Cannot loadSafeBoxFromStream on a Safebox in a Separate chain');
|
|
If Assigned(FPreviousSafeBox) then Raise Exception.Create('Cannot loadSafeBoxFromStream on a Safebox in a Separate chain');
|
|
if (previousCheckedSafebox = Self) then previousCheckedSafebox := Nil; // Protection
|
|
if (previousCheckedSafebox = Self) then previousCheckedSafebox := Nil; // Protection
|
|
@@ -2892,11 +2892,11 @@ begin
|
|
Exit;
|
|
Exit;
|
|
end;
|
|
end;
|
|
if LValidatedOPPending>0 then begin
|
|
if LValidatedOPPending>0 then begin
|
|
- if (Assigned(progressNotify)) and ((TPlatform.GetElapsedMilliseconds(tc)>=500)) then begin
|
|
|
|
|
|
+ if (Assigned(progressNotify)) and ((TPlatform.GetElapsedMilliseconds(tc)>=500)) then begin
|
|
tc := TPlatform.GetTickCount;
|
|
tc := TPlatform.GetTickCount;
|
|
progressNotify(Self,Format('Validating OperationBlock info %d/%d',[LValidatedOPOk,LValidatedOPOk+LValidatedOPPending]),LValidatedOPOk,LValidatedOPOk+LValidatedOPPending);
|
|
progressNotify(Self,Format('Validating OperationBlock info %d/%d',[LValidatedOPOk,LValidatedOPOk+LValidatedOPPending]),LValidatedOPOk,LValidatedOPOk+LValidatedOPPending);
|
|
end else Sleep(100)
|
|
end else Sleep(100)
|
|
-
end;
|
|
|
|
|
|
+ end;
|
|
until LValidatedOPPending<=0 ;
|
|
until LValidatedOPPending<=0 ;
|
|
end;
|
|
end;
|
|
finally
|
|
finally
|