소스 검색

deep-mining-log: need ring buffer to be one bigger for all-blocks-mined case

Jason Carver 10 년 전
부모
커밋
de12183d38
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      miner/worker.go

+ 1 - 1
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
 	}