Skip to content

Commit

Permalink
update to latest geth
Browse files Browse the repository at this point in the history
  • Loading branch information
angaz committed Oct 7, 2023
1 parent 124fac6 commit bf75152
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/crawler/handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"net"
"time"

ethCommon "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/forkid"
ethTypes "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/log"
Expand Down Expand Up @@ -56,7 +56,7 @@ func getClientInfo(genesis *core.Genesis, networkID uint64, nodeURL string, n *e
return nil, fmt.Errorf("cannot set conn deadline: %w", err)
}

s := getStatus(genesis.Config, uint32(conn.negotiatedProtoVersion), genesis.ToBlock().Hash(), networkID, nodeURL)
s := getStatus(genesis.Config, uint32(conn.negotiatedProtoVersion), genesis.ToBlock(), networkID, nodeURL)
if err = conn.Write(s); err != nil {
return nil, err
}
Expand Down Expand Up @@ -145,14 +145,14 @@ func readHello(conn *Conn, info *common.ClientInfo) error {
}
}

func getStatus(config *params.ChainConfig, version uint32, genesis ethCommon.Hash, network uint64, nodeURL string) *Status {
func getStatus(config *params.ChainConfig, version uint32, genesis *ethTypes.Block, network uint64, nodeURL string) *Status {
if _status == nil {
_status = &Status{
ProtocolVersion: version,
NetworkID: network,
TD: big.NewInt(0),
Head: genesis,
Genesis: genesis,
Head: genesis.Hash(),
Genesis: genesis.Hash(),
ForkID: forkid.NewID(config, genesis, 0, 0),
}
}
Expand Down

0 comments on commit bf75152

Please sign in to comment.