From de12183d3824c25763e8996c14f8b5a52832fad6 Mon Sep 17 00:00:00 2001 From: Jason Carver Date: Tue, 26 May 2015 18:55:52 -0700 Subject: deep-mining-log: need ring buffer to be one bigger for all-blocks-mined case --- miner/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'miner/worker.go') 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 } -- cgit