浏览代码

Some logs added to check working as expected

Pascal Coin 3 年之前
父节点
当前提交
bbfd1edf20
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 1 0
      src/core/UBlockChain.pas
  2. 5 0
      src/core/UPoolMining.pas

+ 1 - 0
src/core/UBlockChain.pas

@@ -2147,6 +2147,7 @@ begin
           )
         ) then begin
           // if it fails then it number of operations could be maxed out, not a problem
+          TLog.NewLog(lterror,ClassName,Format('Cannot add OpRecover %d/%d %s error %s',[i+1,LRecoverAccounts.Count,LOpRecoverFounds.ToString,errors]));
           Break;
         end;
       finally

+ 5 - 0
src/core/UPoolMining.pas

@@ -790,6 +790,11 @@ var tree : TOperationsHashTree;
     if checkDuplicate then begin
       if tree.IndexOfOperation(Op)>=0 then exit;
     end;
+    if (Op is TOpRecoverFounds) then begin
+      if Not TAccountComp.EqualAccountKeys( TOpRecoverFounds(Op).Data.new_accountkey , FMinerOperations.OperationBlock.account_key ) then begin
+        TLog.NewLog(lterror,ClassName,'Adding a OpRecoverFounds operation from another public key: '+Op.ToString);
+      end;
+    end;
     tree.AddOperationToHashTree(Op);
   End;
 Var i,j : Integer;