Sha256Hash spendingHash = spentBy.getParentTransaction().getHash(); int spentByTransactionIndex = spentBy.getParentTransaction().getInputs().indexOf(spentBy); outputBuilder.setSpentByTransactionHash(hashToByteString(spendingHash)) .setSpentByTransactionIndex(spentByTransactionIndex);
Sha256Hash spendingHash = spentBy.getParentTransaction().getHash(); int spentByTransactionIndex = spentBy.getParentTransaction().getInputs().indexOf(spentBy); outputBuilder.setSpentByTransactionHash(hashToByteString(spendingHash)) .setSpentByTransactionIndex(spentByTransactionIndex);
Sha256Hash spendingHash = spentBy.getParentTransaction().getHash(); int spentByTransactionIndex = spentBy.getParentTransaction().getInputs().indexOf(spentBy); outputBuilder.setSpentByTransactionHash(hashToByteString(spendingHash)) .setSpentByTransactionIndex(spentByTransactionIndex);
Sha256Hash spendingHash = spentBy.getParentTransaction().getHash(); int spentByTransactionIndex = spentBy.getParentTransaction().getInputs().indexOf(spentBy); outputBuilder.setSpentByTransactionHash(hashToByteString(spendingHash)) .setSpentByTransactionIndex(spentByTransactionIndex);
Sha256Hash spendingHash = spentBy.getParentTransaction().getHash(); int spentByTransactionIndex = spentBy.getParentTransaction().getInputs().indexOf(spentBy); outputBuilder.setSpentByTransactionHash(hashToByteString(spendingHash)) .setSpentByTransactionIndex(spentByTransactionIndex);
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.TransactionOutput other) { if (other == org.bitcoinj.wallet.Protos.TransactionOutput.getDefaultInstance()) return this; if (other.hasValue()) { setValue(other.getValue()); } if (other.hasScriptBytes()) { setScriptBytes(other.getScriptBytes()); } if (other.hasSpentByTransactionHash()) { setSpentByTransactionHash(other.getSpentByTransactionHash()); } if (other.hasSpentByTransactionIndex()) { setSpentByTransactionIndex(other.getSpentByTransactionIndex()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoinj.wallet.Protos.TransactionOutput other) { if (other == org.bitcoinj.wallet.Protos.TransactionOutput.getDefaultInstance()) return this; if (other.hasValue()) { setValue(other.getValue()); } if (other.hasScriptBytes()) { setScriptBytes(other.getScriptBytes()); } if (other.hasSpentByTransactionHash()) { setSpentByTransactionHash(other.getSpentByTransactionHash()); } if (other.hasSpentByTransactionIndex()) { setSpentByTransactionIndex(other.getSpentByTransactionIndex()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoinj.wallet.Protos.TransactionOutput other) { if (other == org.bitcoinj.wallet.Protos.TransactionOutput.getDefaultInstance()) return this; if (other.hasValue()) { setValue(other.getValue()); } if (other.hasScriptBytes()) { setScriptBytes(other.getScriptBytes()); } if (other.hasSpentByTransactionHash()) { setSpentByTransactionHash(other.getSpentByTransactionHash()); } if (other.hasSpentByTransactionIndex()) { setSpentByTransactionIndex(other.getSpentByTransactionIndex()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoinj.wallet.Protos.TransactionOutput other) { if (other == org.bitcoinj.wallet.Protos.TransactionOutput.getDefaultInstance()) return this; if (other.hasValue()) { setValue(other.getValue()); } if (other.hasScriptBytes()) { setScriptBytes(other.getScriptBytes()); } if (other.hasSpentByTransactionHash()) { setSpentByTransactionHash(other.getSpentByTransactionHash()); } if (other.hasSpentByTransactionIndex()) { setSpentByTransactionIndex(other.getSpentByTransactionIndex()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.bitcoinj.wallet.Protos.TransactionOutput other) { if (other == org.bitcoinj.wallet.Protos.TransactionOutput.getDefaultInstance()) return this; if (other.hasValue()) { setValue(other.getValue()); } if (other.hasScriptBytes()) { setScriptBytes(other.getScriptBytes()); } if (other.hasSpentByTransactionHash()) { setSpentByTransactionHash(other.getSpentByTransactionHash()); } if (other.hasSpentByTransactionIndex()) { setSpentByTransactionIndex(other.getSpentByTransactionIndex()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }