public org.bitcoinj.wallet.Protos.TransactionInput buildPartial() { org.bitcoinj.wallet.Protos.TransactionInput result = new org.bitcoinj.wallet.Protos.TransactionInput(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
/** * <code>repeated .wallet.TransactionInput transaction_input = 6;</code> */ public org.bitcoinj.wallet.Protos.TransactionInput.Builder addTransactionInputBuilder() { return getTransactionInputFieldBuilder().addBuilder( org.bitcoinj.wallet.Protos.TransactionInput.getDefaultInstance()); } /**
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, transactionOutPointHash_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(2, transactionOutPointIndex_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, scriptBytes_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeUInt32(4, sequence_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeInt64(5, value_); } getUnknownFields().writeTo(output); }
byte[] scriptBytes = inputProto.getScriptBytes().toByteArray(); TransactionOutPoint outpoint = new TransactionOutPoint(params, inputProto.getTransactionOutPointIndex() & 0xFFFFFFFFL, byteStringToHash(inputProto.getTransactionOutPointHash()) ); Coin value = inputProto.hasValue() ? Coin.valueOf(inputProto.getValue()) : null; TransactionInput input = new TransactionInput(params, tx, scriptBytes, outpoint, value); if (inputProto.hasSequence()) input.setSequenceNumber(0xffffffffL & inputProto.getSequence()); tx.addInput(input); Protos.ScriptWitness witnessProto = txProto.getTransactionInput(i).getWitness(); if (witnessProto.getDataCount() > 0) { TransactionWitness witness = new TransactionWitness(witnessProto.getDataCount());
byte[] scriptBytes = inputProto.getScriptBytes().toByteArray(); TransactionOutPoint outpoint = new TransactionOutPoint(params, inputProto.getTransactionOutPointIndex() & 0xFFFFFFFFL, byteStringToHash(inputProto.getTransactionOutPointHash()) ); Coin value = inputProto.hasValue() ? Coin.valueOf(inputProto.getValue()) : null; TransactionInput input = new TransactionInput(params, tx, scriptBytes, outpoint, value); if (inputProto.hasSequence()) input.setSequenceNumber(0xffffffffL & inputProto.getSequence()); tx.addInput(input);
byte[] scriptBytes = inputProto.getScriptBytes().toByteArray(); TransactionOutPoint outpoint = new TransactionOutPoint(params, inputProto.getTransactionOutPointIndex() & 0xFFFFFFFFL, byteStringToHash(inputProto.getTransactionOutPointHash()) ); Coin value = inputProto.hasValue() ? Coin.valueOf(inputProto.getValue()) : null; TransactionInput input = new TransactionInput(params, tx, scriptBytes, outpoint, value); if (inputProto.hasSequence()) input.setSequenceNumber(0xffffffffL & inputProto.getSequence()); tx.addInput(input);
byte[] scriptBytes = inputProto.getScriptBytes().toByteArray(); TransactionOutPoint outpoint = new TransactionOutPoint(params, inputProto.getTransactionOutPointIndex() & 0xFFFFFFFFL, byteStringToHash(inputProto.getTransactionOutPointHash()) ); Coin value = inputProto.hasValue() ? Coin.valueOf(inputProto.getValue()) : null; TransactionInput input = new TransactionInput(params, tx, scriptBytes, outpoint, value); if (inputProto.hasSequence()) input.setSequenceNumber(0xffffffffL & inputProto.getSequence()); tx.addInput(input);
byte[] scriptBytes = transactionInput.getScriptBytes().toByteArray(); TransactionOutPoint outpoint = new TransactionOutPoint(params, transactionInput.getTransactionOutPointIndex() & 0xFFFFFFFFL, byteStringToHash(transactionInput.getTransactionOutPointHash()) ); TransactionInput input = new TransactionInput(params, tx, scriptBytes, outpoint); if (transactionInput.hasSequence()) { input.setSequenceNumber(transactionInput.getSequence());
assertEquals(Protos.Transaction.Pool.PENDING, t1p.getPool()); assertFalse(t1p.hasLockTime()); assertFalse(t1p.getTransactionInput(0).hasSequence()); assertArrayEquals(t1.getInputs().get(0).getOutpoint().getHash().getBytes(), t1p.getTransactionInput(0).getTransactionOutPointHash().toByteArray()); assertEquals(0, t1p.getTransactionInput(0).getTransactionOutPointIndex()); assertEquals(t1p.getTransactionOutput(0).getValue(), v1.value);
.computeMessageSize(6, witness_); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size;
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, transactionOutPointHash_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, transactionOutPointIndex_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, scriptBytes_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, sequence_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, value_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public org.bitcoinj.wallet.Protos.TransactionInput buildPartial() { org.bitcoinj.wallet.Protos.TransactionInput result = new org.bitcoinj.wallet.Protos.TransactionInput(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.transactionOutPointHash_ = transactionOutPointHash_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.transactionOutPointIndex_ = transactionOutPointIndex_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.scriptBytes_ = scriptBytes_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.sequence_ = sequence_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, transactionOutPointHash_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, transactionOutPointIndex_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, scriptBytes_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, sequence_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, value_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public org.bitcoinj.wallet.Protos.TransactionInput buildPartial() { org.bitcoinj.wallet.Protos.TransactionInput result = new org.bitcoinj.wallet.Protos.TransactionInput(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.transactionOutPointHash_ = transactionOutPointHash_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.transactionOutPointIndex_ = transactionOutPointIndex_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.scriptBytes_ = scriptBytes_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.sequence_ = sequence_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public org.bitcoinj.wallet.Protos.TransactionInput buildPartial() { org.bitcoinj.wallet.Protos.TransactionInput result = new org.bitcoinj.wallet.Protos.TransactionInput(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.transactionOutPointHash_ = transactionOutPointHash_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.transactionOutPointIndex_ = transactionOutPointIndex_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.scriptBytes_ = scriptBytes_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.sequence_ = sequence_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, transactionOutPointHash_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, transactionOutPointIndex_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, scriptBytes_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, sequence_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, value_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, transactionOutPointHash_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, transactionOutPointIndex_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, scriptBytes_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, sequence_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public org.bitcoinj.wallet.Protos.TransactionInput buildPartial() { org.bitcoinj.wallet.Protos.TransactionInput result = new org.bitcoinj.wallet.Protos.TransactionInput(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.transactionOutPointHash_ = transactionOutPointHash_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.transactionOutPointIndex_ = transactionOutPointIndex_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.scriptBytes_ = scriptBytes_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.sequence_ = sequence_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasTransactionOutPointHash()) { memoizedIsInitialized = 0; return false; } if (!hasTransactionOutPointIndex()) { memoizedIsInitialized = 0; return false; } if (!hasScriptBytes()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, transactionOutPointHash_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(2, transactionOutPointIndex_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, scriptBytes_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeUInt32(4, sequence_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeInt64(5, value_); } getUnknownFields().writeTo(output); }