Skip to content

Commit

Permalink
v2/consortium_test: only insert newly created blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco4203 committed Oct 25, 2024
1 parent 69b0c7f commit 46ac8f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions consensus/consortium/v2/consortium_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2219,7 +2219,7 @@ func testSystemTransactionOrder(t *testing.T, scheme string) {
}

func TestIsPeriodBlock(t *testing.T) {
//testIsPeriodBlock(t, rawdb.PathScheme)
testIsPeriodBlock(t, rawdb.PathScheme)
testIsPeriodBlock(t, rawdb.HashScheme)
}

Expand Down Expand Up @@ -2302,7 +2302,7 @@ func testIsPeriodBlock(t *testing.T, scheme string) {
block, _ := core.GenerateChain(&chainConfig, bs[len(bs)-1], ethash.NewFaker(), db, 1, callback, true)
bs = append(bs, block...)
}
if _, err := chain.InsertChain(bs[:], nil); err != nil {
if _, err := chain.InsertChain(bs[399:], nil); err != nil {
panic(err)
}

Expand Down Expand Up @@ -2330,7 +2330,7 @@ Will disable this test firstly for further investigation.
*/
func TestIsTrippEffective(t *testing.T) {
testIsTrippEffective(t, rawdb.HashScheme)
// testIsTrippEffective(t, rawdb.PathScheme)
testIsTrippEffective(t, rawdb.PathScheme)

}

Expand Down Expand Up @@ -2417,7 +2417,7 @@ func testIsTrippEffective(t *testing.T, scheme string) {
block, _ := core.GenerateChain(&chainConfig, bs[len(bs)-1], ethash.NewFaker(), db, 1, callback, true)
bs = append(bs, block...)
}
if _, err := chain.InsertChain(bs[:], nil); err != nil {
if _, err := chain.InsertChain(bs[399:], nil); err != nil {
panic(err)
}

Expand Down

0 comments on commit 46ac8f4

Please sign in to comment.