From 8a7fb5fd342ee9d4c2e8609d4c008f12c5956a41 Mon Sep 17 00:00:00 2001 From: Jason Carver Date: Sat, 23 May 2015 12:00:18 -0700 Subject: [PATCH] do not export constant for when to log a deep block you mined --- miner/worker.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/miner/worker.go b/miner/worker.go index 5b4af64cb4..937e98e438 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -38,7 +38,7 @@ type Agent interface { GetHashRate() int64 } -const MINING_LOG_AT_DEPTH = 5 +const miningLogAtDepth = 5 type UInt64RingBuffer struct { ints []uint64 //array of all integers in buffer @@ -219,7 +219,7 @@ out: func newLocalMinedBlock(blockNumber uint64, prevMinedBlocks *UInt64RingBuffer) (minedBlocks *UInt64RingBuffer) { if prevMinedBlocks == nil { - minedBlocks = &UInt64RingBuffer{next: 0, ints: make([]uint64, MINING_LOG_AT_DEPTH)} + minedBlocks = &UInt64RingBuffer{next: 0, ints: make([]uint64, miningLogAtDepth)} } else { minedBlocks = prevMinedBlocks } @@ -353,9 +353,9 @@ func (self *worker) logLocalMinedBlocks(previous *environment) { if previous != nil && self.current.localMinedBlocks != nil { nextBlockNum := self.current.block.Number().Uint64() for checkBlockNum := previous.block.Number().Uint64(); checkBlockNum < nextBlockNum; checkBlockNum++ { - inspectBlockNum := checkBlockNum - MINING_LOG_AT_DEPTH + inspectBlockNum := checkBlockNum - miningLogAtDepth if self.isBlockLocallyMined(inspectBlockNum) { - glog.V(logger.Info).Infof("🔨 🔗 Mined %d blocks back: block #%v", MINING_LOG_AT_DEPTH, inspectBlockNum) + glog.V(logger.Info).Infof("🔨 🔗 Mined %d blocks back: block #%v", miningLogAtDepth, inspectBlockNum) } } }