Protos.TransactionInput.Builder inputBuilder = Protos.TransactionInput.newBuilder() .setScriptBytes(ByteString.copyFrom(input.getScriptBytes())) .setTransactionOutPointHash(hashToByteString(input.getOutpoint().getHash())) .setTransactionOutPointIndex((int) input.getOutpoint().getIndex()); if (input.hasSequence()) {
Protos.TransactionInput.Builder inputBuilder = Protos.TransactionInput.newBuilder() .setScriptBytes(ByteString.copyFrom(input.getScriptBytes())) .setTransactionOutPointHash(hashToByteString(input.getOutpoint().getHash())) .setTransactionOutPointIndex((int) input.getOutpoint().getIndex()); if (input.hasSequence())
Protos.TransactionInput.Builder inputBuilder = Protos.TransactionInput.newBuilder() .setScriptBytes(ByteString.copyFrom(input.getScriptBytes())) .setTransactionOutPointHash(hashToByteString(input.getOutpoint().getHash())) .setTransactionOutPointIndex((int) input.getOutpoint().getIndex()); if (input.hasSequence())
Protos.TransactionInput.Builder inputBuilder = Protos.TransactionInput.newBuilder() .setScriptBytes(ByteString.copyFrom(input.getScriptBytes())) .setTransactionOutPointHash(hashToByteString(input.getOutpoint().getHash())) .setTransactionOutPointIndex((int) input.getOutpoint().getIndex()); if (input.hasSequence())
Protos.TransactionInput.Builder inputBuilder = Protos.TransactionInput.newBuilder() .setScriptBytes(ByteString.copyFrom(input.getScriptBytes())) .setTransactionOutPointHash(hashToByteString(input.getOutpoint().getHash())) .setTransactionOutPointIndex((int) input.getOutpoint().getIndex()); if (input.hasSequence())
private static Protos.Wallet attemptHexConversion(Protos.Wallet proto) { // Try to convert any raw hashes and such to textual equivalents for easier debugging. This makes it a bit // less "raw" but we will just abort on any errors. try { Protos.Wallet.Builder builder = proto.toBuilder(); for (Protos.Transaction.Builder tx : builder.getTransactionBuilderList()) { tx.setHash(bytesToHex(tx.getHash())); for (int i = 0; i < tx.getBlockHashCount(); i++) tx.setBlockHash(i, bytesToHex(tx.getBlockHash(i))); for (Protos.TransactionInput.Builder input : tx.getTransactionInputBuilderList()) input.setTransactionOutPointHash(bytesToHex(input.getTransactionOutPointHash())); for (Protos.TransactionOutput.Builder output : tx.getTransactionOutputBuilderList()) { if (output.hasSpentByTransactionHash()) output.setSpentByTransactionHash(bytesToHex(output.getSpentByTransactionHash())); } // TODO: keys, ip addresses etc. } return builder.build(); } catch (Throwable throwable) { log.error("Failed to do hex conversion on wallet proto", throwable); return proto; } }
public Builder mergeFrom(org.bitcoinj.wallet.Protos.TransactionInput other) { if (other == org.bitcoinj.wallet.Protos.TransactionInput.getDefaultInstance()) return this; if (other.hasTransactionOutPointHash()) { setTransactionOutPointHash(other.getTransactionOutPointHash()); } if (other.hasTransactionOutPointIndex()) { setTransactionOutPointIndex(other.getTransactionOutPointIndex()); } if (other.hasScriptBytes()) { setScriptBytes(other.getScriptBytes()); } if (other.hasSequence()) { setSequence(other.getSequence()); } if (other.hasValue()) { setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoinj.wallet.Protos.TransactionInput other) { if (other == org.bitcoinj.wallet.Protos.TransactionInput.getDefaultInstance()) return this; if (other.hasTransactionOutPointHash()) { setTransactionOutPointHash(other.getTransactionOutPointHash()); } if (other.hasTransactionOutPointIndex()) { setTransactionOutPointIndex(other.getTransactionOutPointIndex()); } if (other.hasScriptBytes()) { setScriptBytes(other.getScriptBytes()); } if (other.hasSequence()) { setSequence(other.getSequence()); } if (other.hasValue()) { setValue(other.getValue()); } if (other.hasWitness()) { mergeWitness(other.getWitness()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoinj.wallet.Protos.TransactionInput other) { if (other == org.bitcoinj.wallet.Protos.TransactionInput.getDefaultInstance()) return this; if (other.hasTransactionOutPointHash()) { setTransactionOutPointHash(other.getTransactionOutPointHash()); } if (other.hasTransactionOutPointIndex()) { setTransactionOutPointIndex(other.getTransactionOutPointIndex()); } if (other.hasScriptBytes()) { setScriptBytes(other.getScriptBytes()); } if (other.hasSequence()) { setSequence(other.getSequence()); } if (other.hasValue()) { setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoinj.wallet.Protos.TransactionInput other) { if (other == org.bitcoinj.wallet.Protos.TransactionInput.getDefaultInstance()) return this; if (other.hasTransactionOutPointHash()) { setTransactionOutPointHash(other.getTransactionOutPointHash()); } if (other.hasTransactionOutPointIndex()) { setTransactionOutPointIndex(other.getTransactionOutPointIndex()); } if (other.hasScriptBytes()) { setScriptBytes(other.getScriptBytes()); } if (other.hasSequence()) { setSequence(other.getSequence()); } if (other.hasValue()) { setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoinj.wallet.Protos.TransactionInput other) { if (other == org.bitcoinj.wallet.Protos.TransactionInput.getDefaultInstance()) return this; if (other.hasTransactionOutPointHash()) { setTransactionOutPointHash(other.getTransactionOutPointHash()); } if (other.hasTransactionOutPointIndex()) { setTransactionOutPointIndex(other.getTransactionOutPointIndex()); } if (other.hasScriptBytes()) { setScriptBytes(other.getScriptBytes()); } if (other.hasSequence()) { setSequence(other.getSequence()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }