Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
bing bong
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear committed Nov 1, 2023
1 parent c7a36fc commit f31c9dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cosmos/x/evm/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (k *Keeper) InitGenesis(ctx sdk.Context, genState *core.Genesis) error {

// Insert to chain.
k.chain.PreparePlugins(ctx.WithEventManager(sdk.NewEventManager()))
return k.chain.InsertGenesisBlock(genState.ToBlock())
return k.chain.WriteGenesisBlock(genState.ToBlock())
}

// ExportGenesis returns the exported genesis state.
Expand Down
2 changes: 1 addition & 1 deletion cosmos/x/evm/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
type Blockchain interface {
PreparePlugins(context.Context)
Config() *params.ChainConfig
InsertGenesisBlock(*coretypes.Block) error
WriteGenesisBlock(*coretypes.Block) error
InsertBlockAndSetHead(*coretypes.Block) error
GetBlockByNumber(uint64) *coretypes.Block
}
Expand Down
6 changes: 3 additions & 3 deletions eth/core/chain_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ import (
// ChainWriter defines methods that are used to perform state and block transitions.
type ChainWriter interface {
LoadLastState(context.Context, uint64) error
InsertGenesisBlock(block *types.Block) error
WriteGenesisBlock(block *types.Block) error
InsertBlockAndSetHead(block *types.Block) error
WriteBlockAndSetHead(block *types.Block, receipts []*types.Receipt, logs []*types.Log,
state state.StateDB, emitHeadEvent bool) (status core.WriteStatus, err error)
}

// InsertGenesisBlock inserts the genesis block into the blockchain.
func (bc *blockchain) InsertGenesisBlock(block *types.Block) error {
// WriteGenesisBlock inserts the genesis block into the blockchain.
func (bc *blockchain) WriteGenesisBlock(block *types.Block) error {
// TODO: add more validation here.
if block.NumberU64() != 0 {
return errors.New("not the genesis block")
Expand Down

0 comments on commit f31c9dc

Please sign in to comment.