Skip to content

Commit

Permalink
Merge branch 'develop' into indexer.eth.sends
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Aug 22, 2023
2 parents 05f9c57 + a4b72a4 commit 27ab653
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions op-node/rollup/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ type L1Client interface {
func (cfg *Config) CheckL1ChainID(ctx context.Context, client L1Client) error {
id, err := client.ChainID(ctx)
if err != nil {
return err
return fmt.Errorf("failed to get L1 chain ID: %w", err)
}
if cfg.L1ChainID.Cmp(id) != 0 {
return fmt.Errorf("incorrect L1 RPC chain id %d, expected %d", id, cfg.L1ChainID)
Expand All @@ -151,7 +151,7 @@ func (cfg *Config) CheckL1ChainID(ctx context.Context, client L1Client) error {
func (cfg *Config) CheckL1GenesisBlockHash(ctx context.Context, client L1Client) error {
l1GenesisBlockRef, err := client.L1BlockRefByNumber(ctx, cfg.Genesis.L1.Number)
if err != nil {
return err
return fmt.Errorf("failed to get L1 genesis blockhash: %w", err)
}
if l1GenesisBlockRef.Hash != cfg.Genesis.L1.Hash {
return fmt.Errorf("incorrect L1 genesis block hash %s, expected %s", l1GenesisBlockRef.Hash, cfg.Genesis.L1.Hash)
Expand All @@ -168,7 +168,7 @@ type L2Client interface {
func (cfg *Config) CheckL2ChainID(ctx context.Context, client L2Client) error {
id, err := client.ChainID(ctx)
if err != nil {
return err
return fmt.Errorf("failed to get L2 chain ID: %w", err)
}
if cfg.L2ChainID.Cmp(id) != 0 {
return fmt.Errorf("incorrect L2 RPC chain id %d, expected %d", id, cfg.L2ChainID)
Expand All @@ -180,7 +180,7 @@ func (cfg *Config) CheckL2ChainID(ctx context.Context, client L2Client) error {
func (cfg *Config) CheckL2GenesisBlockHash(ctx context.Context, client L2Client) error {
l2GenesisBlockRef, err := client.L2BlockRefByNumber(ctx, cfg.Genesis.L2.Number)
if err != nil {
return err
return fmt.Errorf("failed to get L2 genesis blockhash: %w", err)
}
if l2GenesisBlockRef.Hash != cfg.Genesis.L2.Hash {
return fmt.Errorf("incorrect L2 genesis block hash %s, expected %s", l2GenesisBlockRef.Hash, cfg.Genesis.L2.Hash)
Expand Down

0 comments on commit 27ab653

Please sign in to comment.