public com.openwallet.core.protos.Protos.Transaction buildPartial() { com.openwallet.core.protos.Protos.Transaction result = new com.openwallet.core.protos.Protos.Transaction(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
size += 1 * getBlockHashList().size(); size += 1 * getBlockRelativityOffsetsList().size(); .computeInt32Size(18, numOfOutputs_); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size;
/** * <code>repeated .com.openwallet.core.protos.Transaction transaction = 7;</code> */ public com.openwallet.core.protos.Protos.Transaction.Builder addTransactionBuilder() { return getTransactionFieldBuilder().addBuilder( com.openwallet.core.protos.Protos.Transaction.getDefaultInstance()); } /**
public Builder mergeFrom(com.openwallet.core.protos.Protos.Transaction other) { if (other == com.openwallet.core.protos.Protos.Transaction.getDefaultInstance()) return this; if (other.hasVersion()) { setVersion(other.getVersion()); if (other.hasTime()) { setTime(other.getTime()); if (other.hasHash()) { setHash(other.getHash()); if (other.hasPool()) { setPool(other.getPool()); if (other.hasLockTime()) { setLockTime(other.getLockTime()); if (other.hasUpdatedAt()) { setUpdatedAt(other.getUpdatedAt()); if (other.hasNumOfOutputs()) { setNumOfOutputs(other.getNumOfOutputs()); if (other.hasConfidence()) { mergeConfidence(other.getConfidence()); if (other.hasTokenId()) { setTokenId(other.getTokenId()); if (other.hasExtraBytes()) {
private void readTransaction(Protos.Transaction txProto, CoinType params) throws UnreadableWalletException { boolean isTrimmed = txProto.getIsTrimmed(); Sha256Hash hash = byteStringToHash(txProto.getHash()); if (isTrimmed) { int numOfOutputs; if (txProto.hasNumOfOutputs()) { needsOutputIndexes = true; numOfOutputs = txProto.getNumOfOutputs(); } else { numOfOutputs = txProto.getTransactionOutputList().size(); tx.setVersion(txProto.getVersion()); tx.setTime(txProto.getTime()); tx.setTokenId((byte) (0xFF & txProto.getTokenId())); if (txProto.hasExtraBytes() && (isFamily(tx.getParams(), VPNCOIN) || (isFamily(tx.getParams(), CLAMS) && tx.getVersion() > 1))) { tx.setExtraBytes(txProto.getExtraBytes().toByteArray()); if (txProto.hasUpdatedAt()) { tx.setUpdateTime(new Date(txProto.getUpdatedAt())); for (Protos.TransactionOutput outputProto : txProto.getTransactionOutputList()) { TransactionOutput output = getOutput(params, tx, outputProto.getValue(), outputProto.getScriptBytes()); for (Protos.TransactionInput inputProto : txProto.getTransactionInputList()) { byte[] scriptBytes = inputProto.getScriptBytes().toByteArray();
private BitWalletTransaction connectTransactionOutputs(Protos.Transaction txProto) throws UnreadableWalletException { BitTransaction tx = txMap.get(txProto.getHash()); final WalletTransaction.Pool pool; switch (txProto.getPool()) { case PENDING: pool = WalletTransaction.Pool.PENDING; break; case SPENT: case DEAD: default: throw new UnreadableWalletException("Unknown transaction pool: " + txProto.getPool()); final Protos.TransactionOutput transactionOutput = txProto.getTransactionOutput(i); if (txProto.hasConfidence()) { Protos.TransactionConfidence confidenceProto = txProto.getConfidence(); Transaction rawTx = tx.getRawTransaction(); TransactionConfidence confidence = rawTx.getConfidence();
if (isInitialized == 0) return false; if (!hasVersion()) { memoizedIsInitialized = 0; return false; if (!hasHash()) { memoizedIsInitialized = 0; return false; for (int i = 0; i < getTransactionInputCount(); i++) { if (!getTransactionInput(i).isInitialized()) { memoizedIsInitialized = 0; return false; for (int i = 0; i < getTransactionOutputCount(); i++) { if (!getTransactionOutput(i).isInitialized()) { memoizedIsInitialized = 0; return false; if (hasConfidence()) { if (!getConfidence().isInitialized()) { memoizedIsInitialized = 0; return false;
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.openwallet.core.protos.Protos.Transaction.getDescriptor().getEnumTypes().get(0); }
public com.openwallet.core.protos.Protos.Transaction getDefaultInstanceForType() { return com.openwallet.core.protos.Protos.Transaction.getDefaultInstance(); }
/** * <code>repeated .com.openwallet.core.protos.Transaction transaction = 7;</code> */ public com.openwallet.core.protos.Protos.Transaction.Builder addTransactionBuilder( int index) { return getTransactionFieldBuilder().addBuilder( index, com.openwallet.core.protos.Protos.Transaction.getDefaultInstance()); } /**
/** * <code>required bytes hash = 2;</code> */ public Builder clearHash() { bitField0_ = (bitField0_ & ~0x00000004); hash_ = getDefaultInstance().getHash(); onChanged(); return this; }
/** * <code>optional bytes extra_bytes = 13;</code> */ public Builder clearExtraBytes() { bitField0_ = (bitField0_ & ~0x00002000); extraBytes_ = getDefaultInstance().getExtraBytes(); onChanged(); return this; }