p2p/discv5: add deprecation warning and remove unused code (#20367)
* p2p/discv5: add deprecation warning and remove unused code * p2p/discv5: remove unused variables
This commit is contained in:
committed by
Péter Szilágyi
parent
0abcf03fde
commit
fdff182f11
@ -294,15 +294,6 @@ func (s *simulation) launchNode(log bool) *Network {
|
||||
return net
|
||||
}
|
||||
|
||||
func (s *simulation) dropNode(id NodeID) {
|
||||
s.mu.Lock()
|
||||
n := s.nodes[id]
|
||||
delete(s.nodes, id)
|
||||
s.mu.Unlock()
|
||||
|
||||
n.Close()
|
||||
}
|
||||
|
||||
type simTransport struct {
|
||||
joinTime time.Time
|
||||
sender NodeID
|
||||
@ -358,22 +349,6 @@ func (st *simTransport) sendPing(remote *Node, remoteAddr *net.UDPAddr, topics [
|
||||
return hash
|
||||
}
|
||||
|
||||
func (st *simTransport) sendPong(remote *Node, pingHash []byte) {
|
||||
raddr := remote.addr()
|
||||
|
||||
st.sendPacket(remote.ID, ingressPacket{
|
||||
remoteID: st.sender,
|
||||
remoteAddr: st.senderAddr,
|
||||
hash: st.nextHash(),
|
||||
ev: pongPacket,
|
||||
data: &pong{
|
||||
To: rpcEndpoint{IP: raddr.IP, UDP: uint16(raddr.Port), TCP: 30303},
|
||||
ReplyTok: pingHash,
|
||||
Expiration: uint64(time.Now().Unix() + int64(expiration)),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func (st *simTransport) sendFindnodeHash(remote *Node, target common.Hash) {
|
||||
st.sendPacket(remote.ID, ingressPacket{
|
||||
remoteID: st.sender,
|
||||
|
Reference in New Issue
Block a user