Browse Source

nodestatus param ready_s fix

PascalCoin 6 years ago
parent
commit
b2f5131e62
2 changed files with 4 additions and 4 deletions
  1. 2 1
      src/core/UNetProtocol.pas
  2. 2 3
      src/core/UNode.pas

+ 2 - 1
src/core/UNetProtocol.pas

@@ -2005,8 +2005,9 @@ end;
 
 
 function TNetData.IsGettingNewBlockChainFromClient(var status: AnsiString): Boolean;
 function TNetData.IsGettingNewBlockChainFromClient(var status: AnsiString): Boolean;
 begin
 begin
-  status := FNewBlockChainFromClientStatus;
   Result := FIsGettingNewBlockChainFromClient;
   Result := FIsGettingNewBlockChainFromClient;
+  if (Result) then  status := FNewBlockChainFromClientStatus
+  else status := '';
 end;
 end;
 
 
 procedure TNetData.SetMaxNodeServersAddressesBuffer(AValue: Integer);
 procedure TNetData.SetMaxNodeServersAddressesBuffer(AValue: Integer);

+ 2 - 3
src/core/UNode.pas

@@ -712,12 +712,11 @@ begin
   CurrentProcess := '';
   CurrentProcess := '';
   if FBank.IsReady(CurrentProcess) then begin
   if FBank.IsReady(CurrentProcess) then begin
     if FNetServer.Active then begin
     if FNetServer.Active then begin
-      if TNetData.NetData.IsGettingNewBlockChainFromClient(CurrentProcess) then begin
-        CurrentProcess := CurrentProcess;
-      end else begin
+      if Not TNetData.NetData.IsGettingNewBlockChainFromClient(CurrentProcess) then begin
         if TNetData.NetData.MaxRemoteOperationBlock.block>FOperations.OperationBlock.block then begin
         if TNetData.NetData.MaxRemoteOperationBlock.block>FOperations.OperationBlock.block then begin
           CurrentProcess := 'Found block '+inttostr(TNetData.NetData.MaxRemoteOperationBlock.block)+' (Wait until downloaded)';
           CurrentProcess := 'Found block '+inttostr(TNetData.NetData.MaxRemoteOperationBlock.block)+' (Wait until downloaded)';
         end else begin
         end else begin
+          CurrentProcess := '';
           Result := true;
           Result := true;
         end;
         end;
       end;
       end;