From 6b79d5e43b710b4e885f43ba716fe074a6b40880 Mon Sep 17 00:00:00 2001 From: Alok Menghrajani Date: Thu, 20 Sep 2018 20:57:32 +0200 Subject: [PATCH] Fix typos/spelling issues in comments. --- .../java/org/bitcoinj/core/AddressMessage.java | 4 ++-- .../java/org/bitcoinj/core/BitcoinSerializer.java | 2 +- core/src/main/java/org/bitcoinj/core/Block.java | 6 +++--- .../main/java/org/bitcoinj/core/FilteredBlock.java | 4 ++-- .../java/org/bitcoinj/core/NetworkParameters.java | 4 ++-- core/src/main/java/org/bitcoinj/core/Peer.java | 6 +++--- .../org/bitcoinj/core/StoredUndoableBlock.java | 2 +- .../listeners/BlocksDownloadedEventListener.java | 2 +- .../ChainDownloadStartedEventListener.java | 2 +- .../core/listeners/GetDataEventListener.java | 2 +- .../listeners/PreMessageReceivedEventListener.java | 2 +- .../main/java/org/bitcoinj/net/BlockingClient.java | 2 +- .../java/org/bitcoinj/net/StreamConnection.java | 4 ++-- .../java/org/bitcoinj/utils/BtcAutoFormat.java | 10 +++++----- .../java/org/bitcoinj/utils/BtcFixedFormat.java | 2 +- .../main/java/org/bitcoinj/utils/BtcFormat.java | 14 +++++++------- .../java/org/bitcoinj/wallet/BasicKeyChain.java | 2 +- .../core/AbstractFullPrunedBlockChainTest.java | 2 +- .../FilteredBlockAndPartialMerkleTreeTests.java | 2 +- .../org/bitcoinj/core/FullBlockTestGenerator.java | 4 ++-- .../protocols/channels/ChannelConnectionTest.java | 2 +- .../test/java/org/bitcoinj/wallet/WalletTest.java | 4 ++-- 22 files changed, 42 insertions(+), 42 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/core/AddressMessage.java b/core/src/main/java/org/bitcoinj/core/AddressMessage.java index 14308381..04b3921b 100644 --- a/core/src/main/java/org/bitcoinj/core/AddressMessage.java +++ b/core/src/main/java/org/bitcoinj/core/AddressMessage.java @@ -36,7 +36,7 @@ public class AddressMessage extends Message { private List addresses; /** - * Contruct a new 'addr' message. + * Construct a new 'addr' message. * @param params NetworkParameters object. * @param offset The location of the first payload byte within the array. * @param serializer the serializer to use for this block. @@ -49,7 +49,7 @@ public class AddressMessage extends Message { } /** - * Contruct a new 'addr' message. + * Construct a new 'addr' message. * @param params NetworkParameters object. * @param serializer the serializer to use for this block. * @param length The length of message if known. Usually this is provided when deserializing of the wire diff --git a/core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java b/core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java index a620373f..73db4d7e 100644 --- a/core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java +++ b/core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java @@ -78,7 +78,7 @@ public class BitcoinSerializer extends MessageSerializer { /** * Constructs a BitcoinSerializer with the given behavior. * - * @param params networkParams used to create Messages instances and termining packetMagic + * @param params networkParams used to create Messages instances and determining packetMagic * @param parseRetain retain the backing byte array of a message for fast reserialization. */ public BitcoinSerializer(NetworkParameters params, boolean parseRetain) { diff --git a/core/src/main/java/org/bitcoinj/core/Block.java b/core/src/main/java/org/bitcoinj/core/Block.java index 0337c75f..c58746a0 100644 --- a/core/src/main/java/org/bitcoinj/core/Block.java +++ b/core/src/main/java/org/bitcoinj/core/Block.java @@ -539,7 +539,7 @@ public class Block extends Message { // ridiculously easy difficulty and this function would accept them. // // To prevent this attack from being possible, elsewhere we check that the difficultyTarget - // field is of the right value. This requires us to have the preceeding blocks. + // field is of the right value. This requires us to have the preceding blocks. BigInteger target = getDifficultyTargetAsInteger(); BigInteger h = getHash().toBigInteger(); @@ -599,7 +599,7 @@ public class Block extends Message { // entry is a hash. // // The hashing algorithm is double SHA-256. The leaves are a hash of the serialized contents of the transaction. - // The interior nodes are hashes of the concenation of the two child hashes. + // The interior nodes are hashes of the concatenation of the two child hashes. // // This structure allows the creation of proof that a transaction was included into a block without having to // provide the full block contents. Instead, you can provide only a Merkle branch. For example to prove tx2 was @@ -693,7 +693,7 @@ public class Block extends Message { // Now we need to check that the body of the block actually matches the headers. The network won't generate // an invalid block, but if we didn't validate this then an untrusted man-in-the-middle could obtain the next // valid block from the network and simply replace the transactions in it with their own fictional - // transactions that reference spent or non-existant inputs. + // transactions that reference spent or non-existent inputs. if (transactions.isEmpty()) throw new VerificationException("Block had no transactions"); if (this.getOptimalEncodingMessageSize() > MAX_BLOCK_SIZE) diff --git a/core/src/main/java/org/bitcoinj/core/FilteredBlock.java b/core/src/main/java/org/bitcoinj/core/FilteredBlock.java index 0e7efe18..2938f8a5 100644 --- a/core/src/main/java/org/bitcoinj/core/FilteredBlock.java +++ b/core/src/main/java/org/bitcoinj/core/FilteredBlock.java @@ -70,8 +70,8 @@ public class FilteredBlock extends Message { /** * Gets a list of leaf hashes which are contained in the partial merkle tree in this filtered block - * - * @throws ProtocolException If the partial merkle block is invalid or the merkle root of the partial merkle block doesnt match the block header + * + * @throws ProtocolException If the partial merkle block is invalid or the merkle root of the partial merkle block doesn't match the block header */ public List getTransactionHashes() throws VerificationException { if (cachedTransactionHashes != null) diff --git a/core/src/main/java/org/bitcoinj/core/NetworkParameters.java b/core/src/main/java/org/bitcoinj/core/NetworkParameters.java index deee6fd2..77c469d0 100644 --- a/core/src/main/java/org/bitcoinj/core/NetworkParameters.java +++ b/core/src/main/java/org/bitcoinj/core/NetworkParameters.java @@ -288,7 +288,7 @@ public abstract class NetworkParameters { /** *

Genesis block for this chain.

* - *

The first block in every chain is a well known constant shared between all Bitcoin implemenetations. For a + *

The first block in every chain is a well known constant shared between all Bitcoin implementations. For a * block to be valid, it must be eventually possible to work backwards to the genesis block by following the * prevBlockHash pointers in the block headers.

* @@ -405,7 +405,7 @@ public abstract class NetworkParameters { /** * Returns whether this network has a maximum number of coins (finite supply) or - * not. Always returns true for Bitcoin, but exists to be overriden for other + * not. Always returns true for Bitcoin, but exists to be overridden for other * networks. */ public abstract boolean hasMaxMoney(); diff --git a/core/src/main/java/org/bitcoinj/core/Peer.java b/core/src/main/java/org/bitcoinj/core/Peer.java index 25dec20a..0e2c0393 100644 --- a/core/src/main/java/org/bitcoinj/core/Peer.java +++ b/core/src/main/java/org/bitcoinj/core/Peer.java @@ -195,7 +195,7 @@ public class Peer extends PeerSocketHandler { /** *

Construct a peer that reads/writes from the given block chain. Transactions stored in a {@link TxConfidenceTable} - * will have their confidence levels updated when a peer announces it, to reflect the greater likelyhood that + * will have their confidence levels updated when a peer announces it, to reflect the greater likelihood that * the transaction is valid.

* *

Note that this does NOT make a connection to the given remoteAddress, it only creates a handler for a @@ -214,7 +214,7 @@ public class Peer extends PeerSocketHandler { /** *

Construct a peer that reads/writes from the given block chain. Transactions stored in a {@link TxConfidenceTable} - * will have their confidence levels updated when a peer announces it, to reflect the greater likelyhood that + * will have their confidence levels updated when a peer announces it, to reflect the greater likelihood that * the transaction is valid.

* *

Note that this does NOT make a connection to the given remoteAddress, it only creates a handler for a @@ -1263,7 +1263,7 @@ public class Peer extends PeerSocketHandler { // previous one: whilst the stopHash is the same (because we use the orphan root), the start hash // will be different and so the getblocks req won't be dropped as a duplicate. We'll end up // requesting a subset of what we already requested, which can lead to parallel chain downloads - // and other nastyness. So we just do a quick removal of redundant getdatas here too. + // and other nastiness. So we just do a quick removal of redundant getdatas here too. // // Note that as of June 2012 Bitcoin Core won't actually ever interleave blocks pushed as // part of chain download with newly announced blocks, so it should always be taken care of by diff --git a/core/src/main/java/org/bitcoinj/core/StoredUndoableBlock.java b/core/src/main/java/org/bitcoinj/core/StoredUndoableBlock.java index 7ed60dd2..22474af3 100644 --- a/core/src/main/java/org/bitcoinj/core/StoredUndoableBlock.java +++ b/core/src/main/java/org/bitcoinj/core/StoredUndoableBlock.java @@ -20,7 +20,7 @@ package org.bitcoinj.core; import java.util.List; /** - * Contains minimal data neccessary to disconnect/connect the transactions + * Contains minimal data necessary to disconnect/connect the transactions * in the stored block at will. Can either store the full set of * transactions (if the inputs for the block have not been tested to work) * or the set of transaction outputs created/destroyed when the block is diff --git a/core/src/main/java/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.java b/core/src/main/java/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.java index 6edb2282..5481726f 100644 --- a/core/src/main/java/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.java +++ b/core/src/main/java/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.java @@ -22,7 +22,7 @@ import javax.annotation.*; /** *

Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, - * they can pre-filter messages before they are procesesed by a {@link Peer} or {@link PeerGroup}, and they can + * they can pre-filter messages before they are processed by a {@link Peer} or {@link PeerGroup}, and they can * provide transactions to remote peers when they ask for them.

*/ public interface BlocksDownloadedEventListener { diff --git a/core/src/main/java/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.java b/core/src/main/java/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.java index 434b0843..927847f4 100644 --- a/core/src/main/java/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.java +++ b/core/src/main/java/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.java @@ -20,7 +20,7 @@ import org.bitcoinj.core.*; /** *

Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, - * they can pre-filter messages before they are procesesed by a {@link Peer} or {@link PeerGroup}, and they can + * they can pre-filter messages before they are processed by a {@link Peer} or {@link PeerGroup}, and they can * provide transactions to remote peers when they ask for them.

*/ public interface ChainDownloadStartedEventListener { diff --git a/core/src/main/java/org/bitcoinj/core/listeners/GetDataEventListener.java b/core/src/main/java/org/bitcoinj/core/listeners/GetDataEventListener.java index 2a67866a..96bb254f 100644 --- a/core/src/main/java/org/bitcoinj/core/listeners/GetDataEventListener.java +++ b/core/src/main/java/org/bitcoinj/core/listeners/GetDataEventListener.java @@ -24,7 +24,7 @@ import java.util.*; /** *

Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, - * they can pre-filter messages before they are procesesed by a {@link Peer} or {@link PeerGroup}, and they can + * they can pre-filter messages before they are processed by a {@link Peer} or {@link PeerGroup}, and they can * provide transactions to remote peers when they ask for them.

*/ public interface GetDataEventListener { diff --git a/core/src/main/java/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.java b/core/src/main/java/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.java index 3bea7ba3..35248625 100644 --- a/core/src/main/java/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.java +++ b/core/src/main/java/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.java @@ -21,7 +21,7 @@ import org.bitcoinj.utils.Threading; /** *

Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, - * they can pre-filter messages before they are procesesed by a {@link Peer} or {@link PeerGroup}, and they can + * they can pre-filter messages before they are processed by a {@link Peer} or {@link PeerGroup}, and they can * provide transactions to remote peers when they ask for them.

*/ public interface PreMessageReceivedEventListener { diff --git a/core/src/main/java/org/bitcoinj/net/BlockingClient.java b/core/src/main/java/org/bitcoinj/net/BlockingClient.java index a6762b26..b4cfbcec 100644 --- a/core/src/main/java/org/bitcoinj/net/BlockingClient.java +++ b/core/src/main/java/org/bitcoinj/net/BlockingClient.java @@ -63,7 +63,7 @@ public class BlockingClient implements MessageWriteTarget { @Nullable final Set clientSet) throws IOException { connectFuture = SettableFuture.create(); // Try to fit at least one message in the network buffer, but place an upper and lower limit on its size to make - // sure it doesnt get too large or have to call read too often. + // sure it doesn't get too large or have to call read too often. connection.setWriteTarget(this); socket = socketFactory.createSocket(); final Context context = Context.get(); diff --git a/core/src/main/java/org/bitcoinj/net/StreamConnection.java b/core/src/main/java/org/bitcoinj/net/StreamConnection.java index 40b4caf1..f46822aa 100644 --- a/core/src/main/java/org/bitcoinj/net/StreamConnection.java +++ b/core/src/main/java/org/bitcoinj/net/StreamConnection.java @@ -22,7 +22,7 @@ import java.nio.ByteBuffer; * A generic handler which is used in {@link NioServer}, {@link NioClient} and {@link BlockingClient} to handle incoming * data streams. * - * Used to be callet StreamParser. + * Used to be called StreamParser. */ public interface StreamConnection { /** Called when the connection socket is closed */ @@ -41,7 +41,7 @@ public interface StreamConnection { * will start reading at (always 0) *
  • May read more than one message (recursively) if there are enough bytes available
  • *
  • Uses some internal buffering to store message which are larger (incl their length prefix) than buff's - * capacity(), ie it is up to this method to ensure we dont run out of buffer space to decode the next message. + * capacity(), ie it is up to this method to ensure we don't run out of buffer space to decode the next message. *
  • *
  • buff will end with its limit the same as it was previously, and its position set to the position up to which * bytes have been read (the same as its return value)
  • diff --git a/core/src/main/java/org/bitcoinj/utils/BtcAutoFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcAutoFormat.java index b48d4a9a..8db38886 100644 --- a/core/src/main/java/org/bitcoinj/utils/BtcAutoFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcAutoFormat.java @@ -60,8 +60,8 @@ import java.util.Locale; public final class BtcAutoFormat extends BtcFormat { /** - * Enum for specifying the style of currency indicators thas are used - * when formatting, ether codes or symbols. + * Enum for specifying the style of currency indicators that are used + * when formatting, either codes or symbols. */ public enum Style { @@ -83,9 +83,9 @@ public final class BtcAutoFormat extends BtcFormat { @Override void apply(DecimalFormat decimalFormat) { /* To switch to using codes from symbols, we replace each single occurrence of the * currency-sign character with two such characters in a row. - * We also insert a space character between every occurence of this character and an - * adjacent numerical digit or negative sign (that is, between the currency-sign and - * the signed-number). */ + * We also insert a space character between every occurrence of this character and + * an adjacent numerical digit or negative sign (that is, between the currency-sign + * and the signed-number). */ decimalFormat.applyPattern( negify(decimalFormat.toPattern()).replaceAll("¤","¤¤"). replaceAll("([#0.,E-])¤¤","$1 ¤¤"). diff --git a/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java index 30472afe..a4c706c5 100644 --- a/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java @@ -70,7 +70,7 @@ public final class BtcFixedFormat extends BtcFormat { public static final int[] REPEATING_TRIPLETS = {3,3,3,3,3}; /** The number of places the decimal point of formatted values is shifted rightward from - * thet same value expressed in bitcoins. */ + * the same value expressed in bitcoins. */ private final int scale; /** Constructor */ diff --git a/core/src/main/java/org/bitcoinj/utils/BtcFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java index 95a7777a..5e5561a7 100644 --- a/core/src/main/java/org/bitcoinj/utils/BtcFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java @@ -533,7 +533,7 @@ public abstract class BtcFormat extends Format { *

    This class constructs new instances of {@link BtcFormat}, allowing for the * configuration of those instances before they are constructed. After obtaining a * {@code Builder} object from the {@link BtcFormat#builder()} method, invoke the - * necessary setter methods to obtain your desired configuration. Finaly, the {@link + * necessary setter methods to obtain your desired configuration. Finally, the {@link * #build()} method returns a new {@code BtcFormat} object that has the specified * configuration. * @@ -914,7 +914,7 @@ public abstract class BtcFormat extends Format { * according to the given locale. * *

    The third parameter is the number of fractional decimal places to use for each - * formatted number, reduced as neccesary when formatting to avoid giving a place to + * formatted number, reduced as necessary when formatting to avoid giving a place to * fractional satoshis. */ public static BtcFormat getInstance(Style style, Locale locale, int fractionPlaces) { @@ -1050,7 +1050,7 @@ public abstract class BtcFormat extends Format { } /** - * Return a new fixeed-denomination formatter with the specified fractional decimal + * Return a new fixed-denomination formatter with the specified fractional decimal * placing. The first argument specifies the denomination as the size of the * shift from coin-denomination in increasingly-precise decimal places. The returned object will format * and parse values according to the default locale, and will format the fractional part of @@ -1064,7 +1064,7 @@ public abstract class BtcFormat extends Format { } /** - * Return a new fixeed-denomination formatter. The argument specifies the denomination as + * Return a new fixed-denomination formatter. The argument specifies the denomination as * the size of the shift from coin-denomination in increasingly-precise decimal places. * The returned object will format and parse values according to the default locale, and * will format the fractional part of numbers with two decimal places, or fewer as @@ -1075,7 +1075,7 @@ public abstract class BtcFormat extends Format { } /** - * Return a new fixeed-denomination formatter for the given locale. The first argument + * Return a new fixed-denomination formatter for the given locale. The first argument * specifies the denomination as the size of the shift from coin-denomination in * increasingly-precise decimal places. The returned object will format and parse values * according to the locale specified by the second argument, and will format the fractional @@ -1247,7 +1247,7 @@ public abstract class BtcFormat extends Format { } /** Return the number of fractional decimal places to be displayed when formatting - * the given number of monetory units of the denomination indicated by the given decimal scale value, + * the given number of monetary units of the denomination indicated by the given decimal scale value, * where 0 = coin, 3 = millicoin, and so on. * * @param unitCount the number of monetary units to be formatted @@ -1526,7 +1526,7 @@ public abstract class BtcFormat extends Format { public static Locale[] getAvailableLocales() { return NumberFormat.getAvailableLocales(); } /** Return the unprefixed currency symbol for bitcoins configured for this object. The - * return value of this method is constant throughough the life of an instance. */ + * return value of this method is constant throughout the life of an instance. */ public String coinSymbol() { synchronized(numberFormat) { return numberFormat.getDecimalFormatSymbols().getCurrencySymbol(); }} diff --git a/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java b/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java index a7b98923..354609ce 100644 --- a/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java @@ -44,7 +44,7 @@ import static com.google.common.base.Preconditions.*; public class BasicKeyChain implements EncryptableKeyChain { private final ReentrantLock lock = Threading.lock("BasicKeyChain"); - // Maps used to let us quickly look up a key given data we find in transcations or the block chain. + // Maps used to let us quickly look up a key given data we find in transactions or the block chain. private final LinkedHashMap hashToKeys; private final LinkedHashMap pubkeyToKeys; @Nullable private final KeyCrypter keyCrypter; diff --git a/core/src/test/java/org/bitcoinj/core/AbstractFullPrunedBlockChainTest.java b/core/src/test/java/org/bitcoinj/core/AbstractFullPrunedBlockChainTest.java index 309fcccd..6d2c2227 100644 --- a/core/src/test/java/org/bitcoinj/core/AbstractFullPrunedBlockChainTest.java +++ b/core/src/test/java/org/bitcoinj/core/AbstractFullPrunedBlockChainTest.java @@ -341,7 +341,7 @@ public abstract class AbstractFullPrunedBlockChainTest { totalPendingTxAmount = totalPendingTxAmount.add(tx.getValueSentToMe(wallet)); } - // The availbale balance should be the 0 (as we spent the 1 BTC that's pending) and estimated should be 1/2 - fee BTC + // The available balance should be the 0 (as we spent the 1 BTC that's pending) and estimated should be 1/2 - fee BTC assertEquals("Available balance is incorrect", Coin.ZERO, wallet.getBalance(Wallet.BalanceType.AVAILABLE)); assertEquals("Estimated balance is incorrect", amount2.subtract(fee), wallet.getBalance(Wallet.BalanceType.ESTIMATED)); assertEquals("Pending tx amount is incorrect", amount2.subtract(fee), totalPendingTxAmount); diff --git a/core/src/test/java/org/bitcoinj/core/FilteredBlockAndPartialMerkleTreeTests.java b/core/src/test/java/org/bitcoinj/core/FilteredBlockAndPartialMerkleTreeTests.java index fd1a5448..9578b089 100644 --- a/core/src/test/java/org/bitcoinj/core/FilteredBlockAndPartialMerkleTreeTests.java +++ b/core/src/test/java/org/bitcoinj/core/FilteredBlockAndPartialMerkleTreeTests.java @@ -129,7 +129,7 @@ public class FilteredBlockAndPartialMerkleTreeTests extends TestWithPeerGroup { @Test public void serializeDownloadBlockWithWallet() throws Exception { - // First we create all the neccessary objects, including lots of serialization and double-checks + // First we create all the necessary objects, including lots of serialization and double-checks // Note that all serialized forms here are generated by Bitcoin Core/pulled from block explorer Block block = new Block(UNITTEST, HEX.decode("0100000006e533fd1ada86391f3f6c343204b0d278d4aaec1c0b20aa27ba0300000000006abbb3eb3d733a9fe18967fd7d4c117e4ccbbac5bec4d910d900b3ae0793e77f54241b4d4c86041b4089cc9b0c01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff07044c86041b010dffffffff0100f2052a01000000434104b27f7e9475ccf5d9a431cb86d665b8302c140144ec2397fce792f4a4e7765fecf8128534eaa71df04f93c74676ae8279195128a1506ebf7379d23dab8fca0f63ac000000000100000001d992e5a888a86d4c7a6a69167a4728ee69497509740fc5f456a24528c340219a000000008b483045022100f0519bdc9282ff476da1323b8ef7ffe33f495c1a8d52cc522b437022d83f6a230220159b61d197fbae01b4a66622a23bc3f1def65d5fa24efd5c26fa872f3a246b8e014104839f9023296a1fabb133140128ca2709f6818c7d099491690bd8ac0fd55279def6a2ceb6ab7b5e4a71889b6e739f09509565eec789e86886f6f936fa42097adeffffffff02000fe208010000001976a914948c765a6914d43f2a7ac177da2c2f6b52de3d7c88ac00e32321000000001976a9140c34f4e29ab5a615d5ea28d4817f12b137d62ed588ac0000000001000000059daf0abe7a92618546a9dbcfd65869b6178c66ec21ccfda878c1175979cfd9ef000000004a493046022100c2f7f25be5de6ce88ac3c1a519514379e91f39b31ddff279a3db0b1a229b708b022100b29efbdbd9837cc6a6c7318aa4900ed7e4d65662c34d1622a2035a3a5534a99a01ffffffffd516330ebdf075948da56db13d22632a4fb941122df2884397dda45d451acefb0000000048473044022051243debe6d4f2b433bee0cee78c5c4073ead0e3bde54296dbed6176e128659c022044417bfe16f44eb7b6eb0cdf077b9ce972a332e15395c09ca5e4f602958d266101ffffffffe1f5aa33961227b3c344e57179417ce01b7ccd421117fe2336289b70489883f900000000484730440220593252bb992ce3c85baf28d6e3aa32065816271d2c822398fe7ee28a856bc943022066d429dd5025d3c86fd8fd8a58e183a844bd94aa312cefe00388f57c85b0ca3201ffffffffe207e83718129505e6a7484831442f668164ae659fddb82e9e5421a081fb90d50000000049483045022067cf27eb733e5bcae412a586b25a74417c237161a084167c2a0b439abfebdcb2022100efcc6baa6824b4c5205aa967e0b76d31abf89e738d4b6b014e788c9a8cccaf0c01ffffffffe23b8d9d80a9e9d977fab3c94dbe37befee63822443c3ec5ae5a713ede66c3940000000049483045022020f2eb35036666b1debe0d1d2e77a36d5d9c4e96c1dba23f5100f193dbf524790221008ce79bc1321fb4357c6daee818038d41544749127751726e46b2b320c8b565a201ffffffff0200ba1dd2050000001976a914366a27645806e817a6cd40bc869bdad92fe5509188ac40420f00000000001976a914ee8bd501094a7d5ca318da2506de35e1cb025ddc88ac0000000001000000010abad2dc0c9b4b1dbb023077da513f81e5a71788d8680fca98ef1c37356c459c000000004a493046022100a894e521c87b3dbe23007079db4ac2896e9e791f8b57317ba6c0d99a7becd27a022100bc40981393eafeb33e89079f857c728701a9af4523c3f857cd96a500f240780901ffffffff024026ee22010000001976a914d28f9cefb58c1f7a5f97aa6b79047585f58fbd4388acc0cb1707000000001976a9142229481696e417aa5f51ad751d8cd4c6a669e4fe88ac000000000100000001f66d89b3649e0b18d84db056930676cb81c0168042fc4324c3682e252ea9410d0000000048473044022038e0b55b37c9253bfeda59c76c0134530f91fb586d6eb21738a77a984f370a44022048d4d477aaf97ef9c8275bbc5cb19b9c8a0e9b1f9fdafdd39bc85bf6c2f04a4d01ffffffff024041a523010000001976a914955f70ac8792b48b7bd52b15413bd8500ecf32c888ac00f36f06000000001976a91486116d15f3dbb23a2b58346f36e6ec2d867eba2b88ac00000000010000000126c384984f63446a4f2be8dd6531ba9837bd5f2c3d37403c5f51fb9192ee754e010000008b48304502210083af8324456f052ff1b2597ff0e6a8cce8b006e379a410cf781be7874a2691c2022072259e2f7292960dea0ffc361bbad0b861f719beb8550476f22ce0f82c023449014104f3ed46a81cba02af0593e8572a9130adb0d348b538c829ccaaf8e6075b78439b2746a76891ce7ba71abbcbb7ca76e8a220782738a6789562827c1065b0ce911dffffffff02c0dd9107000000001976a91463d4dd1b29d95ed601512b487bfc1c49d84d057988ac00a0491a010000001976a91465746bef92511df7b34abf71c162efb7ae353de388ac0000000001000000011b56cf3aab3286d582c055a42af3a911ee08423f276da702bb67f1222ac1a5b6000000008c4930460221009e9fba682e162c9627b96b7df272006a727988680b956c61baff869f0907b8fb022100a9c19adc7c36144bafe526630783845e5cb9554d30d3edfb56f0740274d507f30141046e0efbfac7b1615ad553a6f097615bc63b7cdb3b8e1cb3263b619ba63740012f51c7c5b09390e3577e377b7537e61226e315f95f926444fc5e5f2978c112e448ffffffff02c0072b11010000001976a914b73e9e01933351ca076faf8e0d94dd58079d0b1f88ac80b63908000000001976a9141aca0bdf0d2cee63db19aa4a484f45a4e26a880c88ac000000000100000001251b187504ea873b2c3915fad401f7a7734cc13567e0417708e86294a29f4f68010000008b4830450221009bef423141ed1ae60d0a5bcaa57b1673fc96001f0d4e105535cca817ba5a7724022037c399bd30374f22481ffc81327cfca4951c7264b227f765fcd6a429f3d9d2080141044d0d1b4f194c31a73dbce41c42b4b3946849117c5bb320467e014bad3b1532f28a9a1568ba7108f188e7823b6e618e91d974306701379a27b9339e646e156e7bffffffff02c00fd103010000001976a914ef7f5d9e1bc6ed68cfe0b1db9d8f09cef0f3ba4a88ac004dd208000000001976a914c22420641cea028c9e06c4d9104c1646f8b1769088ac0000000001000000013486dd5f0a2f3efcc04f64cb03872c021f98ee39f514747ce5336b874bbe47a7010000008b48304502201cadddc2838598fee7dc35a12b340c6bde8b389f7bfd19a1252a17c4b5ed2d71022100c1a251bbecb14b058a8bd77f65de87e51c47e95904f4c0e9d52eddc21c1415ac014104fe7df86d58aafa9246ca6fd30c905714533c25f700e2329b8ecec8aa52083b844baa3a8acd5d6b9732dcb39079bb56ba2711a3580dec824955fce0596a460c11ffffffff02c011f6e1000000001976a91490fac83c9adde91d670dde8755f8b475ab9e427d88acc0f9df15000000001976a91437f691b3e8ee5dcb56c2e31af4c80caa2df3b09b88ac00000000010000000170016bd1274b795b262f32a53003a4714b22b62f9057adf5fbe6ed939003b5190100000089463043022061456499582170a94d6b54308f792e37dad28bf0ed7aa61021f0301d2774d378021f4224b33f707efd810a01dd34ea86d6069cd599cc435513a0eef8c83c137bf7014104a2c95d6b98e745448eb45ed0ba95cf24dd7c3b16386e1028e24a0358ee4afc33e2f0199139853edaf32845d8a42254c75f7dc8add3286c682c650fbd93f0a4a1ffffffff02001bd2b7000000001976a9141b11c6acaa5223013f3a3240fdb024ecd9f8135488ac8023ad18000000001976a914ada27ca87bbaa1ee6fb1cb61bb0a29baaf6da2c988ac000000000100000001c8ff91f031ec6a5aba4baee6549e61dd01f26f61b70e2f1574f24cd680f464ad000000008b48304502210082235e21a2300022738dabb8e1bbd9d19cfb1e7ab8c30a23b0afbb8d178abcf3022024bf68e256c534ddfaf966bf908deb944305596f7bdcc38d69acad7f9c868724014104174f9eef1157dc1ad5eac198250b70d1c3b04b2fca12ad1483f07358486f02909b088bbc83f4de55f767f6cdf9d424aa02b5eeaffa08394d39b717895fc08d0affffffff0200ea3b43000000001976a914fb32df708f0610901f6d1b6df8c9c368fe0d981c88ac800f1777000000001976a914462c501c70fb996d15ac0771e7fc8d3ca3f7201888ac000000000100000001c67323867de802402e780a70e0deba3c708c4d87497e17590afee9c321f1c680010000008a473044022042734b25f54845d662e6499b75ff8529ff47f42fd224498a9f752d212326dbfa0220523e4b7b570bbb1f3af02baa2c04ea8eb7b0fccb1522cced130b666ae9a9d014014104b5a23b922949877e9eaf7512897ed091958e2e8cf05b0d0eb9064e7976043fde6023b4e2c188b7e38ef94eec6845dc4933f5e8635f1f6a3702290956aa9e284bffffffff0280041838030000001976a91436e5884215f7d3044be5d37bdd8c987d9d942c8488ac404b4c00000000001976a91460085d6838f8a44a21a0de56ff963cfa6242a96188ac00000000")); FilteredBlock filteredBlock = new FilteredBlock(UNITTEST, HEX.decode("0100000006e533fd1ada86391f3f6c343204b0d278d4aaec1c0b20aa27ba0300000000006abbb3eb3d733a9fe18967fd7d4c117e4ccbbac5bec4d910d900b3ae0793e77f54241b4d4c86041b4089cc9b0c000000084c30b63cfcdc2d35e3329421b9805ef0c6565d35381ca857762ea0b3a5a128bbca5065ff9617cbcba45eb23726df6498a9b9cafed4f54cbab9d227b0035ddefbbb15ac1d57d0182aaee61c74743a9c4f785895e563909bafec45c9a2b0ff3181d77706be8b1dcc91112eada86d424e2d0a8907c3488b6e44fda5a74a25cbc7d6bb4fa04245f4ac8a1a571d5537eac24adca1454d65eda446055479af6c6d4dd3c9ab658448c10b6921b7a4ce3021eb22ed6bb6a7fde1e5bcc4b1db6615c6abc5ca042127bfaf9f44ebce29cb29c6df9d05b47f35b2edff4f0064b578ab741fa78276222651209fe1a2c4c0fa1c58510aec8b090dd1eb1f82f9d261b8273b525b02ff1a")); diff --git a/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java b/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java index a87975dc..03daed93 100644 --- a/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java +++ b/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java @@ -321,7 +321,7 @@ public class FullBlockTestGenerator { NewBlock b13 = createNextBlock(b12, chainHeadHeight + 5, out4, null); blocks.add(new BlockAndValidity(b13, false, false, b6.getHash(), chainHeadHeight + 4, "b13")); - // Make sure we dont die if an orphan gets added twice + // Make sure we don't die if an orphan gets added twice blocks.add(new BlockAndValidity(b13, false, false, b6.getHash(), chainHeadHeight + 4, "b13")); spendableOutputs.offer(b13.getCoinbaseOutput()); @@ -332,7 +332,7 @@ public class FullBlockTestGenerator { // and will be discarded when an attempt is made to reorg to it. // TODO: Use a WeakReference to check that it is freed properly after the reorg blocks.add(new BlockAndValidity(b14, false, false, b6.getHash(), chainHeadHeight + 4, "b14")); - // Make sure we dont die if an orphan gets added twice + // Make sure we don't die if an orphan gets added twice blocks.add(new BlockAndValidity(b14, false, false, b6.getHash(), chainHeadHeight + 4, "b14")); blocks.add(new BlockAndValidity(b12, false, true, b13.getHash(), chainHeadHeight + 5, "b12")); diff --git a/core/src/test/java/org/bitcoinj/protocols/channels/ChannelConnectionTest.java b/core/src/test/java/org/bitcoinj/protocols/channels/ChannelConnectionTest.java index 2fa93a45..b4a9d2ac 100644 --- a/core/src/test/java/org/bitcoinj/protocols/channels/ChannelConnectionTest.java +++ b/core/src/test/java/org/bitcoinj/protocols/channels/ChannelConnectionTest.java @@ -120,7 +120,7 @@ public class ChannelConnectionTest extends TestWithWallet { serverWallet = new Wallet(UNITTEST); serverWallet.addExtension(new StoredPaymentChannelServerStates(serverWallet, failBroadcaster)); serverWallet.freshReceiveKey(); - // Use an atomic boolean to indicate failure because fail()/assert*() dont work in network threads + // Use an atomic boolean to indicate failure because fail()/assert*() don't work in network threads fail = new AtomicBoolean(false); // Set up a way to monitor broadcast transactions. When you expect a broadcast, you must release a permit diff --git a/core/src/test/java/org/bitcoinj/wallet/WalletTest.java b/core/src/test/java/org/bitcoinj/wallet/WalletTest.java index c21c1503..34176847 100644 --- a/core/src/test/java/org/bitcoinj/wallet/WalletTest.java +++ b/core/src/test/java/org/bitcoinj/wallet/WalletTest.java @@ -1478,7 +1478,7 @@ public class WalletTest extends TestWithWallet { assertEquals(tx2, transactions.get(0)); assertEquals(tx1, transactions.get(1)); assertEquals(2, transactions.size()); - // Check we get only the last transaction if we request a subrage. + // Check we get only the last transaction if we request a subrange. transactions = wallet.getRecentTransactions(1, false); assertEquals(1, transactions.size()); assertEquals(tx2, transactions.get(0)); @@ -2498,7 +2498,7 @@ public class WalletTest extends TestWithWallet { assertEquals(COIN, request20.tx.getInput(0).getValue()); assertEquals(CENT, request20.tx.getInput(1).getValue()); - // Same as request 19, but make the change 0 (so it doesnt force fee) and make us require min fee + // Same as request 19, but make the change 0 (so it doesn't force fee) and make us require min fee SendRequest request21 = SendRequest.to(OTHER_ADDRESS, CENT); request21.feePerKb = ZERO; request21.ensureMinRequiredFee = true;