Skip to content

Commit bf75152

Browse files
committed
update to latest geth
1 parent 124fac6 commit bf75152

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/crawler/handshake.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"net"
1010
"time"
1111

12-
ethCommon "github.com/ethereum/go-ethereum/common"
1312
"github.com/ethereum/go-ethereum/core"
1413
"github.com/ethereum/go-ethereum/core/forkid"
14+
ethTypes "github.com/ethereum/go-ethereum/core/types"
1515
"github.com/ethereum/go-ethereum/crypto"
1616
"github.com/ethereum/go-ethereum/ethclient"
1717
"github.com/ethereum/go-ethereum/log"
@@ -56,7 +56,7 @@ func getClientInfo(genesis *core.Genesis, networkID uint64, nodeURL string, n *e
5656
return nil, fmt.Errorf("cannot set conn deadline: %w", err)
5757
}
5858

59-
s := getStatus(genesis.Config, uint32(conn.negotiatedProtoVersion), genesis.ToBlock().Hash(), networkID, nodeURL)
59+
s := getStatus(genesis.Config, uint32(conn.negotiatedProtoVersion), genesis.ToBlock(), networkID, nodeURL)
6060
if err = conn.Write(s); err != nil {
6161
return nil, err
6262
}
@@ -145,14 +145,14 @@ func readHello(conn *Conn, info *common.ClientInfo) error {
145145
}
146146
}
147147

148-
func getStatus(config *params.ChainConfig, version uint32, genesis ethCommon.Hash, network uint64, nodeURL string) *Status {
148+
func getStatus(config *params.ChainConfig, version uint32, genesis *ethTypes.Block, network uint64, nodeURL string) *Status {
149149
if _status == nil {
150150
_status = &Status{
151151
ProtocolVersion: version,
152152
NetworkID: network,
153153
TD: big.NewInt(0),
154-
Head: genesis,
155-
Genesis: genesis,
154+
Head: genesis.Hash(),
155+
Genesis: genesis.Hash(),
156156
ForkID: forkid.NewID(config, genesis, 0, 0),
157157
}
158158
}

0 commit comments

Comments
 (0)