Skip to content

Commit

Permalink
Remove now unneeded test
Browse files Browse the repository at this point in the history
  • Loading branch information
piersy committed Sep 17, 2024
1 parent e6dd516 commit c20996f
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions core/blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
"github.com/celo-org/celo-blockchain/ethdb"
"github.com/celo-org/celo-blockchain/params"
"github.com/celo-org/celo-blockchain/trie"
"github.com/stretchr/testify/require"
)

// So we can deterministically seed different blockchains
Expand Down Expand Up @@ -206,28 +205,6 @@ func TestLastBlock(t *testing.T) {
}
}

func TestNoInsertPastL2MigrationBlock(t *testing.T) {
_, blockchain, err := newCanonical(mockEngine.NewFaker(), 0, true)
if err != nil {
t.Fatalf("failed to create pristine chain: %v", err)
}
defer blockchain.Stop()

blockchain.chainConfig = blockchain.chainConfig.DeepCopy()
migrationBlock := 2
blockchain.chainConfig.L2MigrationBlock = big.NewInt(int64(migrationBlock))

blocks := makeBlockChain(blockchain.CurrentBlock(), 100000, mockEngine.NewFullFaker(), blockchain.db, 0)
failedBlock, err := blockchain.InsertChain(blocks)
require.EqualError(t, err, errInsertionInterrupted.Error())
// Compare with migrationBlock-1 because failedBlock is the index of the failed block in the blocks[] array, not in the actual blockchain.
require.EqualValues(t, migrationBlock-1, failedBlock)
// Only the first block in blocks[] should be inserted
if blocks[migrationBlock-2].Hash() != rawdb.ReadHeadBlockHash(blockchain.db) {
t.Fatalf("Write/Get HeadBlockHash failed")
}
}

// Tests that given a starting canonical chain of a given size, it can be extended
// with various length chains.
func TestExtendCanonicalHeaders(t *testing.T) { testExtendCanonical(t, false) }
Expand Down

0 comments on commit c20996f

Please sign in to comment.