Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alecps committed Aug 16, 2024
1 parent 356528c commit 188e8ff
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ func geth(ctx *cli.Context) error {

prepare(ctx)
stack, backend := makeFullNode(ctx)

defer stack.Close()

startNode(ctx, stack, backend)
Expand Down
3 changes: 3 additions & 0 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,9 @@ func (bc *BlockChain) ExportN(w io.Writer, first uint64, last uint64) error {
//
// Note, this function assumes that the `mu` mutex is held!
func (bc *BlockChain) writeHeadBlock(block *types.Block) {
// Normally the check at the end of the function will pass first, but if a node is restarted
// with the same l2-migration-block configured after already reaching and stopping on l2-migration-block,
// this check will pass first and log an error.
if bc.Config().IsL2Migration(block.Number()) {
log.Error("Attempt to insert block number >= l2MigrationBlock, stopping block insertion", "block", block.NumberU64(), "hash", block.Hash())
bc.StopInsert()
Expand Down
3 changes: 0 additions & 3 deletions core/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ var (
ErrNoGenesis = errors.New("genesis not found in chain")

errSideChainReceipts = errors.New("side blocks can't be accepted as ancient chain data")

// ErrL2Migration is returned when the current block is greater than or equal to the L2 migration block
ErrL2Migration = errors.New("chain has migrated to L2, data exists beyond the configured migration block")
)

// List of evm-call-message pre-checking errors. All state transition messages will
Expand Down
5 changes: 2 additions & 3 deletions e2e_test/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"math/big"
"os"
"os/exec"
"strings"
"sync"
Expand Down Expand Up @@ -35,10 +34,10 @@ func init() {
// This statement is commented out but left here since its very useful for
// debugging problems and its non trivial to construct.
//
log.Root().SetHandler(log.LvlFilterHandler(log.LvlInfo, log.StreamHandler(os.Stdout, log.TerminalFormat(true))))
// log.Root().SetHandler(log.LvlFilterHandler(log.LvlInfo, log.StreamHandler(os.Stdout, log.TerminalFormat(true))))

// This disables all logging which in general we want, because there is a lot
// log.Root().SetHandler(log.DiscardHandler())
log.Root().SetHandler(log.DiscardHandler())
}

// This test starts a network submits a transaction and waits for the whole
Expand Down

0 comments on commit 188e8ff

Please sign in to comment.