浏览代码

consensus/ethash: replace a magic number with it's constant (#22618)

Evolution404 4 年之前
父节点
当前提交
e275b1a293
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      consensus/ethash/algorithm.go

+ 1 - 1
consensus/ethash/algorithm.go

@@ -174,7 +174,7 @@ func generateCache(dest []uint32, epoch uint64, seed []byte) {
 			case <-done:
 			case <-done:
 				return
 				return
 			case <-time.After(3 * time.Second):
 			case <-time.After(3 * time.Second):
-				logger.Info("Generating ethash verification cache", "percentage", atomic.LoadUint32(&progress)*100/uint32(rows)/4, "elapsed", common.PrettyDuration(time.Since(start)))
+				logger.Info("Generating ethash verification cache", "percentage", atomic.LoadUint32(&progress)*100/uint32(rows)/(cacheRounds+1), "elapsed", common.PrettyDuration(time.Since(start)))
 			}
 			}
 		}
 		}
 	}()
 	}()