Browse Source

Assing valid Miner AccountKey both daemon and gui app

PascalCoin 3 years ago
parent
commit
4f1b0af820
2 changed files with 4 additions and 4 deletions
  1. 3 3
      src/core/UBlockChain.pas
  2. 1 1
      src/core/UPoolMining.pas

+ 3 - 3
src/core/UBlockChain.pas

@@ -433,7 +433,7 @@ Type
     function LoadBlockFromStream(Stream: TStream; var errors: String): Boolean;
     //
     Function GetMinerRewardPseudoOperation : TOperationResume;
-    Function AddMinerRecover(LRecoverAccounts: TAccountList) : Boolean;
+    Function AddMinerRecover(LRecoverAccounts: TAccountList; const ANewAccountKey : TAccountKey) : Boolean;
     Function ValidateOperationBlock(var errors : String) : Boolean;
     Property IsOnlyOperationBlock : Boolean read FIsOnlyOperationBlock;
     Procedure Lock;
@@ -2118,7 +2118,7 @@ begin
    Result.OperationTxt := 'Miner reward';
 end;
 
-function TPCOperationsComp.AddMinerRecover(LRecoverAccounts: TAccountList): Boolean;
+function TPCOperationsComp.AddMinerRecover(LRecoverAccounts: TAccountList; const ANewAccountKey : TAccountKey): Boolean;
 var
   LAccount: TAccount;
   LOpRecoverFounds: TOpRecoverFounds;
@@ -2139,7 +2139,7 @@ begin
         LAccount.account,
         LAccount.n_operation+1,
         LmaxFee,
-        Self.AccountKey
+        ANewAccountKey
       );
       try
         if not(

+ 1 - 1
src/core/UPoolMining.pas

@@ -981,7 +981,7 @@ begin
           if Not LAccOrd.Next(LIndexKey) then Break;
           Inc(LRecIndex);
         end;
-        nbOperations.AddMinerRecover(LRecoverAccounts);
+        nbOperations.AddMinerRecover(LRecoverAccounts,FMinerAccountKey);
       end;
     end;
   finally