mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 03:30:35 +00:00
core: fix benchmark panic (#24657)
This PR fixes a few panics in the chain marker benchmarks. The root cause for panic is in chain marker the genesis header/block is not accessible, while it's expected to be obtained in tests. So this PR avoids touching genesis header at all to avoid panic.
This commit is contained in:
parent
c40943a167
commit
195c979168
@ -160,7 +160,7 @@ func genTxRing(naccounts int) func(int, *BlockGen) {
|
||||
|
||||
// genUncles generates blocks with two uncle headers.
|
||||
func genUncles(i int, gen *BlockGen) {
|
||||
if i >= 6 {
|
||||
if i >= 7 {
|
||||
b2 := gen.PrevBlock(i - 6).Header()
|
||||
b2.Extra = []byte("foo")
|
||||
gen.AddUncle(b2)
|
||||
|
Loading…
Reference in New Issue
Block a user