Skip to content

Commit 1e66593

Browse files
int88fjl
authored andcommitted
core: fix uncle creation in TestFastVsFullChains (ethereum#25476)
Co-authored-by: Felix Lange <[email protected]>
1 parent ed51540 commit 1e66593

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/blockchain_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -759,9 +759,9 @@ func TestFastVsFullChains(t *testing.T) {
759759
block.AddTx(tx)
760760
}
761761
}
762-
// If the block number is a multiple of 5, add a few bonus uncles to the block
763-
if i%5 == 5 {
764-
block.AddUncle(&types.Header{ParentHash: block.PrevBlock(i - 1).Hash(), Number: big.NewInt(int64(i - 1))})
762+
// If the block number is a multiple of 5, add an uncle to the block
763+
if i%5 == 4 {
764+
block.AddUncle(&types.Header{ParentHash: block.PrevBlock(i - 2).Hash(), Number: big.NewInt(int64(i))})
765765
}
766766
})
767767
// Import the chain as an archive node for the comparison baseline

0 commit comments

Comments
 (0)