proto/p2p: rename PEX messages and fields (#5974)

Fixes #5899 by renaming a bunch of P2P Protobuf entities (while maintaining wire compatibility):

* `Message` to `PexMessage` (as it's only used for PEX messages).
* `PexAddrs` to `PexResponse`.
* `PexResponse.Addrs` to `PexResponse.Addresses`.
* `NetAddress` to `PexAddress` (as it's only used by PEX).
This commit is contained in:
Erik Grinaker
2021-01-26 16:37:36 +01:00
committed by GitHub
parent 51aca684b8
commit 7ea8746ed1
10 changed files with 466 additions and 466 deletions
+3 -3
View File
@@ -61,9 +61,9 @@ func initCorpus(rootDir string) {
}
addrs = append(addrs, ipv6a)
msg := tmp2p.Message{
Sum: &tmp2p.Message_PexAddrs{
PexAddrs: &tmp2p.PexAddrs{Addrs: p2p.NetAddressesToProto(addrs)},
msg := tmp2p.PexMessage{
Sum: &tmp2p.PexMessage_PexResponse{
PexResponse: &tmp2p.PexResponse{Addresses: p2p.NetAddressesToProto(addrs)},
},
}
bz, err := msg.Marshal()