From ece3943babae26b7eb2ae33def953de2ccb29638 Mon Sep 17 00:00:00 2001 From: avoidaway Date: Sat, 16 Mar 2024 15:34:50 +0800 Subject: [PATCH] LegacyAddress, BitcoinSerializer, MessageSerializer, TransactionReceivedInBlockListener, ECKey, ChildKeyDerivationTest: fix repetitive words in comments --- core/src/main/java/org/bitcoinj/base/LegacyAddress.java | 2 +- core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java | 4 ++-- core/src/main/java/org/bitcoinj/core/MessageSerializer.java | 4 ++-- .../core/listeners/TransactionReceivedInBlockListener.java | 2 +- core/src/main/java/org/bitcoinj/crypto/ECKey.java | 2 +- .../test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/base/LegacyAddress.java b/core/src/main/java/org/bitcoinj/base/LegacyAddress.java index dc1248484..e9d9acb59 100644 --- a/core/src/main/java/org/bitcoinj/base/LegacyAddress.java +++ b/core/src/main/java/org/bitcoinj/base/LegacyAddress.java @@ -161,7 +161,7 @@ public class LegacyAddress implements Address { * Construct a {@link LegacyAddress} from its base58 form. * * @param params - * expected network this address is valid for, or null if if the network should be derived from the + * expected network this address is valid for, or null if the network should be derived from the * base58 * @param base58 * base58-encoded textual form of the address diff --git a/core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java b/core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java index fdbee455a..e7f490381 100644 --- a/core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java +++ b/core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java @@ -135,7 +135,7 @@ public class BitcoinSerializer extends MessageSerializer { } /** - * Writes message to to the output stream. + * Writes message to the output stream. */ @Override public void serialize(String name, byte[] message, OutputStream out) throws IOException { @@ -160,7 +160,7 @@ public class BitcoinSerializer extends MessageSerializer { } /** - * Writes message to to the output stream. + * Writes message to the output stream. */ @Override public void serialize(Message message, OutputStream out) throws IOException { diff --git a/core/src/main/java/org/bitcoinj/core/MessageSerializer.java b/core/src/main/java/org/bitcoinj/core/MessageSerializer.java index 713f114d3..c630a4914 100644 --- a/core/src/main/java/org/bitcoinj/core/MessageSerializer.java +++ b/core/src/main/java/org/bitcoinj/core/MessageSerializer.java @@ -106,7 +106,7 @@ public abstract class MessageSerializer { public abstract void seekPastMagicBytes(ByteBuffer in) throws BufferUnderflowException; /** - * Writes message to to the output stream. + * Writes message to the output stream. * * @throws UnsupportedOperationException if this serializer/deserializer * does not support serialization. This can occur either because it's a dummy @@ -116,7 +116,7 @@ public abstract class MessageSerializer { public abstract void serialize(String name, byte[] message, OutputStream out) throws IOException, UnsupportedOperationException; /** - * Writes message to to the output stream. + * Writes message to the output stream. * * @throws UnsupportedOperationException if this serializer/deserializer * does not support serialization. This can occur either because it's a dummy diff --git a/core/src/main/java/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.java b/core/src/main/java/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.java index 5626f554f..0f6c409db 100644 --- a/core/src/main/java/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.java +++ b/core/src/main/java/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.java @@ -56,7 +56,7 @@ public interface TransactionReceivedInBlockListener { * compared to the relativity count of another transaction received inside the same block. It is used to establish * an ordering of transactions relative to one another.

* - *

This method should return false if the given tx hash isn't known about, e.g. because the the transaction was + *

This method should return false if the given tx hash isn't known about, e.g. because the transaction was * a Bloom false positive. If it was known about and stored, it should return true. The caller may need to know * this to calculate the effective FP rate.

* diff --git a/core/src/main/java/org/bitcoinj/crypto/ECKey.java b/core/src/main/java/org/bitcoinj/crypto/ECKey.java index 39fd798ed..39468e42f 100644 --- a/core/src/main/java/org/bitcoinj/crypto/ECKey.java +++ b/core/src/main/java/org/bitcoinj/crypto/ECKey.java @@ -1224,7 +1224,7 @@ public class ECKey implements EncryptableItem { } /** - * Returns the the encrypted private key bytes and initialisation vector for this ECKey, or null if the ECKey + * Returns the encrypted private key bytes and initialisation vector for this ECKey, or null if the ECKey * is not encrypted. */ @Nullable diff --git a/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java b/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java index a2b7c3c4b..b1f81a34a 100644 --- a/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java +++ b/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java @@ -305,7 +305,7 @@ public class ChildKeyDerivationTest { assertEquals("Parent fingerprint of deserialized parentless private HD key is wrong", key.getParentFingerprint(), 0xbef5a2f9); - // These encodings are of the the root key of that hierarchy + // These encodings are of the root key of that hierarchy assertEquals("Parent fingerprint of root node public HD key should be zero", DeterministicKey.deserializeB58("xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB", MAINNET).getParentFingerprint(), 0);