aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorJason Carver <ut96caarrs@snkmail.com>2015-05-27 09:55:52 +0800
committerJason Carver <ut96caarrs@snkmail.com>2015-05-27 09:55:52 +0800
commitde12183d3824c25763e8996c14f8b5a52832fad6 (patch)
treec5b4698b91eefa50389737159f2ad9be0a4d983b /miner
parent6019f1bb0a0744ffa52bf1ab93309c1a6dd9063c (diff)
downloaddexon-de12183d3824c25763e8996c14f8b5a52832fad6.tar
dexon-de12183d3824c25763e8996c14f8b5a52832fad6.tar.gz
dexon-de12183d3824c25763e8996c14f8b5a52832fad6.tar.bz2
dexon-de12183d3824c25763e8996c14f8b5a52832fad6.tar.lz
dexon-de12183d3824c25763e8996c14f8b5a52832fad6.tar.xz
dexon-de12183d3824c25763e8996c14f8b5a52832fad6.tar.zst
dexon-de12183d3824c25763e8996c14f8b5a52832fad6.zip
deep-mining-log: need ring buffer to be one bigger for all-blocks-mined case
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/miner/worker.go b/miner/worker.go
index fac2e6568..12ed65626 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -219,7 +219,7 @@ out:
func newLocalMinedBlock(blockNumber uint64, prevMinedBlocks *uint64RingBuffer) (minedBlocks *uint64RingBuffer) {
if prevMinedBlocks == nil {
- minedBlocks = &uint64RingBuffer{next: 0, ints: make([]uint64, miningLogAtDepth)}
+ minedBlocks = &uint64RingBuffer{next: 0, ints: make([]uint64, miningLogAtDepth + 1)}
} else {
minedBlocks = prevMinedBlocks
}