浏览代码

nodestatus param ready_s fix

PascalCoin 7 年之前
父节点
当前提交
b2f5131e62
共有 2 个文件被更改,包括 4 次插入4 次删除
  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;
 begin
-  status := FNewBlockChainFromClientStatus;
   Result := FIsGettingNewBlockChainFromClient;
+  if (Result) then  status := FNewBlockChainFromClientStatus
+  else status := '';
 end;
 
 procedure TNetData.SetMaxNodeServersAddressesBuffer(AValue: Integer);

+ 2 - 3
src/core/UNode.pas

@@ -712,12 +712,11 @@ begin
   CurrentProcess := '';
   if FBank.IsReady(CurrentProcess) 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
           CurrentProcess := 'Found block '+inttostr(TNetData.NetData.MaxRemoteOperationBlock.block)+' (Wait until downloaded)';
         end else begin
+          CurrentProcess := '';
           Result := true;
         end;
       end;