aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorJason Carver <ut96caarrs@snkmail.com>2015-05-24 03:00:18 +0800
committerJason Carver <ut96caarrs@snkmail.com>2015-05-24 03:09:52 +0800
commit8a7fb5fd342ee9d4c2e8609d4c008f12c5956a41 (patch)
tree02da0ed4acba6abc71495528b2d3d139b9d8b5c0 /miner
parentba295ec6feb8288bb1e0cacca4ed2c3c5515d133 (diff)
downloaddexon-8a7fb5fd342ee9d4c2e8609d4c008f12c5956a41.tar
dexon-8a7fb5fd342ee9d4c2e8609d4c008f12c5956a41.tar.gz
dexon-8a7fb5fd342ee9d4c2e8609d4c008f12c5956a41.tar.bz2
dexon-8a7fb5fd342ee9d4c2e8609d4c008f12c5956a41.tar.lz
dexon-8a7fb5fd342ee9d4c2e8609d4c008f12c5956a41.tar.xz
dexon-8a7fb5fd342ee9d4c2e8609d4c008f12c5956a41.tar.zst
dexon-8a7fb5fd342ee9d4c2e8609d4c008f12c5956a41.zip
do not export constant for when to log a deep block you mined
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 5b4af64cb..937e98e43 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)
}
}
}