TransactionOutPoint: make direct subclass of Message

It doesn't need a parent.
This commit is contained in:
Andreas Schildbach 2023-03-30 01:04:41 +02:00
parent dabed6fa2d
commit d02853b1f0
2 changed files with 4 additions and 12 deletions

View file

@ -162,7 +162,7 @@ public class TransactionInput extends ChildMessage {
@Override
protected void parse() throws BufferUnderflowException, ProtocolException {
outpoint = new TransactionOutPoint(params, payload, this);
outpoint = new TransactionOutPoint(params, payload);
int scriptLen = VarInt.read(payload).intValue();
scriptBytes = Buffers.readBytes(payload, scriptLen);
sequence = ByteUtils.readUint32(payload);

View file

@ -43,7 +43,7 @@ import static org.bitcoinj.base.internal.Preconditions.checkState;
*
* <p>Instances of this class are not safe for use by multiple threads.</p>
*/
public class TransactionOutPoint extends ChildMessage {
public class TransactionOutPoint extends Message {
static final int MESSAGE_LENGTH = 36;
@ -85,21 +85,13 @@ public class TransactionOutPoint extends ChildMessage {
this.connectedOutput = connectedOutput;
}
/**
/**
* Deserializes the message. This is usually part of a transaction message.
*/
public TransactionOutPoint(NetworkParameters params, ByteBuffer payload) throws ProtocolException {
super(params, payload);
}
/**
* Deserializes the message. This is usually part of a transaction message.
* @param params NetworkParameters object.
* @throws ProtocolException
*/
public TransactionOutPoint(NetworkParameters params, ByteBuffer payload, Message parent) throws ProtocolException {
super(params, payload, parent);
public TransactionOutPoint(NetworkParameters params, ByteBuffer payload) throws ProtocolException {
super(params, payload);
}
@Override