|
9 | 9 | "net"
|
10 | 10 | "time"
|
11 | 11 |
|
12 |
| - ethCommon "github.com/ethereum/go-ethereum/common" |
13 | 12 | "github.com/ethereum/go-ethereum/core"
|
14 | 13 | "github.com/ethereum/go-ethereum/core/forkid"
|
| 14 | + ethTypes "github.com/ethereum/go-ethereum/core/types" |
15 | 15 | "github.com/ethereum/go-ethereum/crypto"
|
16 | 16 | "github.com/ethereum/go-ethereum/ethclient"
|
17 | 17 | "github.com/ethereum/go-ethereum/log"
|
@@ -56,7 +56,7 @@ func getClientInfo(genesis *core.Genesis, networkID uint64, nodeURL string, n *e
|
56 | 56 | return nil, fmt.Errorf("cannot set conn deadline: %w", err)
|
57 | 57 | }
|
58 | 58 |
|
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) |
60 | 60 | if err = conn.Write(s); err != nil {
|
61 | 61 | return nil, err
|
62 | 62 | }
|
@@ -145,14 +145,14 @@ func readHello(conn *Conn, info *common.ClientInfo) error {
|
145 | 145 | }
|
146 | 146 | }
|
147 | 147 |
|
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 { |
149 | 149 | if _status == nil {
|
150 | 150 | _status = &Status{
|
151 | 151 | ProtocolVersion: version,
|
152 | 152 | NetworkID: network,
|
153 | 153 | TD: big.NewInt(0),
|
154 |
| - Head: genesis, |
155 |
| - Genesis: genesis, |
| 154 | + Head: genesis.Hash(), |
| 155 | + Genesis: genesis.Hash(), |
156 | 156 | ForkID: forkid.NewID(config, genesis, 0, 0),
|
157 | 157 | }
|
158 | 158 | }
|
|
0 commit comments