瀏覽代碼

Fixed Bug on orphan block - 2018-10-14

Must update FLastBlockCache properly, otherwise returned cache data is invalid
PascalCoin 6 年之前
父節點
當前提交
96abbe3381
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/UNetProtocol.pas

+ 1 - 1
src/core/UNetProtocol.pas

@@ -1715,7 +1715,7 @@ Const CT_LogSender = 'GetNewBlockChainFromClient';
             If IsUsingSnapshot then begin
               TLog.NewLog(ltInfo,CT_LogSender,'Commiting new chain to Safebox');
               Bank.SafeBox.CommitToPrevious;
-              Bank.UpdateValuesFromSafebox;
+              TNode.Node.Bank.UpdateValuesFromSafebox; // BUG 2018-10-14 -> Must update TNode.Node.Bank instead of Bank, because FLastBlockCache must upgrade
               {$IFDEF Check_Safebox_Names_Consistency}
               If Not Check_Safebox_Names_Consistency(Bank.SafeBox,'Commited',errors) then begin
                 TLog.NewLog(lterror,CT_LogSender,'Fatal safebox consistency error getting bank at block '+IntTosTr(start_block)+' : '+errors);