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")) { } else if (command.equals("addrv2")) {
return makeAddressV2Message(payload); return makeAddressV2Message(payload);
} else if (command.equals("ping")) { } else if (command.equals("ping")) {
return new Ping(params, payload); return new Ping(payload);
} else if (command.equals("pong")) { } else if (command.equals("pong")) {
return new Pong(params, payload); return new Pong(payload);
} else if (command.equals("verack")) { } else if (command.equals("verack")) {
check(!payload.hasRemaining(), ProtocolException::new); check(!payload.hasRemaining(), ProtocolException::new);
return new VersionAck(); return new VersionAck();

View file

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

View file

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