|
|
@@ -61,8 +61,11 @@ func makeChain(n int, seed byte, parent *types.Block, parentReceipts types.Recei
|
|
|
block.AddTx(tx)
|
|
|
}
|
|
|
// If the block number is a multiple of 5, add a bonus uncle to the block
|
|
|
- if i%5 == 0 {
|
|
|
- block.AddUncle(&types.Header{ParentHash: block.PrevBlock(i - 1).Hash(), Number: big.NewInt(int64(i - 1))})
|
|
|
+ if i > 0 && i%5 == 0 {
|
|
|
+ block.AddUncle(&types.Header{
|
|
|
+ ParentHash: block.PrevBlock(i - 1).Hash(),
|
|
|
+ Number: big.NewInt(block.Number().Int64() - 1),
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
// Convert the block-chain into a hash-chain and header/block maps
|