mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 14:34:17 +00:00
fix build
This commit is contained in:
@@ -42,7 +42,7 @@ func initCorpus(rootDir string) {
|
||||
privKey := ed25519.GenPrivKey()
|
||||
addr := fmt.Sprintf(
|
||||
"%s@%v.%v.%v.%v:26656",
|
||||
p2p.NodeIDFromPubKey(privKey.PubKey()),
|
||||
p2p.PubKeyToID(privKey.PubKey()),
|
||||
rand.Int()%256,
|
||||
rand.Int()%256,
|
||||
rand.Int()%256,
|
||||
@@ -55,7 +55,7 @@ func initCorpus(rootDir string) {
|
||||
// IPv6 addresses
|
||||
privKey := ed25519.GenPrivKey()
|
||||
ipv6a, err := p2p.NewNetAddressString(
|
||||
fmt.Sprintf("%s@[ff02::1:114]:26656", p2p.NodeIDFromPubKey(privKey.PubKey())))
|
||||
fmt.Sprintf("%s@[ff02::1:114]:26656", p2p.PubKeyToID(privKey.PubKey())))
|
||||
if err != nil {
|
||||
log.Fatalf("can't create a new netaddress: %v", err)
|
||||
}
|
||||
|
||||
@@ -56,20 +56,20 @@ func newFuzzPeer() *fuzzPeer {
|
||||
}
|
||||
|
||||
var privKey = ed25519.GenPrivKey()
|
||||
var nodeID = p2p.NodeIDFromPubKey(privKey.PubKey())
|
||||
var defaultNodeInfo = p2p.NodeInfo{
|
||||
var nodeID = p2p.PubKeyToID(privKey.PubKey())
|
||||
var defaultNodeInfo = p2p.DefaultNodeInfo{
|
||||
ProtocolVersion: p2p.NewProtocolVersion(
|
||||
version.P2PProtocol,
|
||||
version.BlockProtocol,
|
||||
0,
|
||||
),
|
||||
NodeID: nodeID,
|
||||
ListenAddr: "0.0.0.0:98992",
|
||||
Moniker: "foo1",
|
||||
DefaultNodeID: nodeID,
|
||||
ListenAddr: "0.0.0.0:98992",
|
||||
Moniker: "foo1",
|
||||
}
|
||||
|
||||
func (fp *fuzzPeer) FlushStop() {}
|
||||
func (fp *fuzzPeer) ID() p2p.NodeID { return nodeID }
|
||||
func (fp *fuzzPeer) ID() p2p.ID { return nodeID }
|
||||
func (fp *fuzzPeer) RemoteIP() net.IP { return net.IPv4(0, 0, 0, 0) }
|
||||
func (fp *fuzzPeer) RemoteAddr() net.Addr {
|
||||
return &net.TCPAddr{IP: fp.RemoteIP(), Port: 98991, Zone: ""}
|
||||
|
||||
Reference in New Issue
Block a user