Browse Source

Fixed sanitize operations bug when operations with different protocol

Sanitize must allow different protocol versions
PascalCoin 5 years ago
parent
commit
819d4a9298
1 changed files with 0 additions and 5 deletions
  1. 0 5
      src/core/UBlockChain.pas

+ 0 - 5
src/core/UBlockChain.pas

@@ -1758,10 +1758,6 @@ begin
       lastn := FOperationsHashTree.OperationsCount;
       lastn := FOperationsHashTree.OperationsCount;
       for i:=0 to lastn-1 do begin
       for i:=0 to lastn-1 do begin
         op := FOperationsHashTree.GetOperation(i);
         op := FOperationsHashTree.GetOperation(i);
-        if OperationBlock.protocol_version <> op.ProtocolVersion then begin
-          errors := Format('Sanitize Operation protocol:%d <> current protocol:%d on %s',[op.ProtocolVersion,OperationBlock.protocol_version, op.ToString]);
-          Tlog.NewLog(lterror,ClassName,errors);
-        end else begin
           if (aux.CanAddOperationToHashTree(op)) then begin
           if (aux.CanAddOperationToHashTree(op)) then begin
             if (op.DoOperation(FPreviousUpdatedBlocks, SafeBoxTransaction,errors)) then begin
             if (op.DoOperation(FPreviousUpdatedBlocks, SafeBoxTransaction,errors)) then begin
               if aux.AddOperationToHashTree(op) then begin
               if aux.AddOperationToHashTree(op) then begin
@@ -1776,7 +1772,6 @@ begin
               end;
               end;
             end;
             end;
           end;
           end;
-        end;
       end;
       end;
     Finally
     Finally
       aux2 := FOperationsHashTree;
       aux2 := FOperationsHashTree;