Skip to content

Commit

Permalink
fixes test
Browse files Browse the repository at this point in the history
  • Loading branch information
alecps committed Aug 19, 2024
1 parent 4d1dd28 commit d4ac28c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,11 @@ func TestNoInsertPastL2MigrationBlock(t *testing.T) {
}
defer blockchain.Stop()

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

blocks := makeBlockChain(blockchain.CurrentBlock(), 10000, mockEngine.NewFullFaker(), blockchain.db, 0)
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.
Expand Down

0 comments on commit d4ac28c

Please sign in to comment.