[BESU-25] Use Devp2p Ping packets at v5 (#392)

Broadcast that we support snappy compression

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
pull/401/head
Danno Ferrin 5 years ago committed by GitHub
parent 6677362598
commit bb0c9cb017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      CHANGELOG.md
  2. 4
      ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/internal/PingPacketData.java
  3. 3
      ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/discovery/PeerDiscoveryPacketPcapSedesTest.java

@ -1,5 +1,12 @@
# Changelog
## 1.4.1
### Bug Fixes
- [BESU-25](https://jira.hyperledger.org/browse/BESU-25) Use v5 Devp2p when pinging [\#392](https://github.com/hyperledger/besu/pull/392)
## 1.4.0 RC-1
### Additions and Improvements

@ -22,8 +22,8 @@ import org.hyperledger.besu.ethereum.rlp.RLPOutput;
public class PingPacketData implements PacketData {
/* Fixed value that represents we're using v4 of the P2P discovery protocol. */
private static final int VERSION = 4;
/* Fixed value that represents we're using v5 of the P2P discovery protocol. */
private static final int VERSION = 5;
/* Source. */
private final Endpoint from;

@ -90,7 +90,8 @@ public class PeerDiscoveryPacketPcapSedesTest {
ping.getTo().getTcpPort().ifPresent(p -> assertThat(p).isPositive());
ping.getFrom().getTcpPort().ifPresent(p -> assertThat(p).isPositive());
assertThat(ping.getExpiration()).isPositive();
break;
// because of the version upgrade the ping packet won't re-serialize, so we're done
return;
case PONG:
assertThat(packet.getPacketData(PongPacketData.class)).isPresent();

Loading…
Cancel
Save