Ping, Pong: remove params from constructors

This commit is contained in:
Andreas Schildbach 2023-03-29 22:54:34 +02:00
parent dd2213c7e1
commit 780e43d94d
3 changed files with 6 additions and 6 deletions

View file

@ -240,9 +240,9 @@ public class BitcoinSerializer extends MessageSerializer {
} else if (command.equals("addrv2")) {
return makeAddressV2Message(payload);
} else if (command.equals("ping")) {
return new Ping(params, payload);
return new Ping(payload);
} else if (command.equals("pong")) {
return new Pong(params, payload);
return new Pong(payload);
} else if (command.equals("verack")) {
check(!payload.hasRemaining(), ProtocolException::new);
return new VersionAck();

View file

@ -33,8 +33,8 @@ import java.util.Random;
public class Ping extends Message {
private long nonce;
public Ping(NetworkParameters params, ByteBuffer payload) throws ProtocolException {
super(params, payload);
public Ping(ByteBuffer payload) throws ProtocolException {
super(payload);
}
/**

View file

@ -32,8 +32,8 @@ import java.nio.ByteBuffer;
public class Pong extends Message {
private long nonce;
public Pong(NetworkParameters params, ByteBuffer payload) throws ProtocolException {
super(params, payload);
public Pong(ByteBuffer payload) throws ProtocolException {
super(payload);
}
/**