WTC

bootnode

1 修改core/types/block.go中Header的结构体。加上

Signature []byte `json:"signature" gencodec:"required"`

2 在p2p/discover/udp.go中修改

"os""github.com/ethereum/go-ethereum/common"
p := neighbors{Expiration: uint64(time.Now().Add(expiration).Unix())}// Send neighbors in chunks with at most maxNeighbors per packet// to stay below the 1280 byte limit.for i, n := range closest {if netutil.CheckRelayIP(from.IP, n.IP) != nil {continue}p.Nodes = append(p.Nodes, nodeToRPC(n))if len(p.Nodes) == maxNeighbors || i == len(closest)-1 {t.send(from, neighborsPacket, &p)p.Nodes = p.Nodes[:0]}}fast := make([]*Node, 0, bucketSize)  fast = append(fast,MasterNodes()...)  // Send neighbors in chunks with at most maxNeighbors per packet  // to stay below the 

本文链接:https://my.lmcjl.com/post/15143.html

展开阅读全文

4 评论

留下您的评论.