From 7169810a99852ea710cf735e246da9a38bbb45a3 Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Mon, 10 Feb 2025 17:05:26 -0800 Subject: [PATCH] Transaction: fix typos in comments and exception message --- core/src/main/java/org/bitcoinj/core/Transaction.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/core/Transaction.java b/core/src/main/java/org/bitcoinj/core/Transaction.java index e4e96445c..db03edd3a 100644 --- a/core/src/main/java/org/bitcoinj/core/Transaction.java +++ b/core/src/main/java/org/bitcoinj/core/Transaction.java @@ -1337,7 +1337,7 @@ public class Transaction extends BaseMessage { // We also have to write a hash type (sigHashType is actually an unsigned char) writeInt32LE(0x000000ff & sigHashType, bos); // Note that this is NOT reversed to ensure it will be signed correctly. If it were to be printed out - // however then we would expect that it is IS reversed. + // however then we would expect that it IS reversed. Sha256Hash hash = Sha256Hash.twiceOf(bos.toByteArray()); bos.close(); @@ -1544,7 +1544,7 @@ public class Transaction extends BaseMessage { stream.write(VarInt.of(outputs.size()).serialize()); for (TransactionOutput out : outputs) stream.write(out.serialize()); - // script_witnisses + // script_witnesses if (useSegwit) { for (TransactionInput in : inputs) stream.write(in.getWitness().serialize()); @@ -1613,7 +1613,7 @@ public class Transaction extends BaseMessage { } /** - *

Returns the list of transacion outputs, whether spent or unspent, that match a wallet by address or that are + *

Returns the list of transaction outputs, whether spent or unspent, that match a wallet by address or that are * watched by a wallet, i.e., transaction outputs whose script's address is controlled by the wallet and transaction * outputs whose script is watched by the wallet.

* @@ -1646,7 +1646,7 @@ public class Transaction extends BaseMessage { } /** - * Gets the output the gihven outpoint is referring to. Note the output must belong to this transaction, or else + * Gets the output the given outpoint is referring to. Note the output must belong to this transaction, or else * an {@link IllegalArgumentException} will occur. * * @param outpoint outpoint referring to the output to get @@ -1654,7 +1654,7 @@ public class Transaction extends BaseMessage { */ public TransactionOutput getOutput(TransactionOutPoint outpoint) { checkArgument(outpoint.hash().equals(this.getTxId()), () -> - "outpoint poins to a different transaction"); + "outpoint points to a different transaction"); return getOutput(outpoint.index()); }