diff --git a/core/src/main/java/org/bitcoinj/core/AbstractBlockChain.java b/core/src/main/java/org/bitcoinj/core/AbstractBlockChain.java index 2cf9c894..99631696 100644 --- a/core/src/main/java/org/bitcoinj/core/AbstractBlockChain.java +++ b/core/src/main/java/org/bitcoinj/core/AbstractBlockChain.java @@ -44,7 +44,7 @@ import static com.google.common.base.Preconditions.*; *

An AbstractBlockChain implementation must be connected to a {@link BlockStore} implementation. The chain object * by itself doesn't store any data, that's delegated to the store. Which store you use is a decision best made by * reading the getting started guide, but briefly, fully validating block chains need fully validating stores. In - * the lightweight SPV mode, a {@link org.bitcoinj.store.SPVBlockStore} is the right choice.

+ * the lightweight SPV mode, a {@link SPVBlockStore} is the right choice.

* *

This class implements an abstract class which makes it simple to create a BlockChain that does/doesn't do full * verification. It verifies headers and is implements most of what is required to implement SPV mode, but @@ -53,7 +53,7 @@ import static com.google.common.base.Preconditions.*; *

There are two subclasses of AbstractBlockChain that are useful: {@link BlockChain}, which is the simplest * class and implements simplified payment verification. This is a lightweight and efficient mode that does * not verify the contents of blocks, just their headers. A {@link FullPrunedBlockChain} paired with a - * {@link org.bitcoinj.store.H2FullPrunedBlockStore} implements full verification, which is equivalent to + * {@link H2FullPrunedBlockStore} implements full verification, which is equivalent to * Bitcoin Core. To learn more about the alternative security models, please consult the articles on the * website.

* diff --git a/core/src/main/java/org/bitcoinj/core/Block.java b/core/src/main/java/org/bitcoinj/core/Block.java index f10f5661..22d64547 100644 --- a/core/src/main/java/org/bitcoinj/core/Block.java +++ b/core/src/main/java/org/bitcoinj/core/Block.java @@ -212,7 +212,7 @@ public class Block extends Message { * the system it was 50 coins per block, in late 2012 it went to 25 coins per block, and so on. The size of * a coinbase transaction is inflation plus fees.

* - *

The half-life is controlled by {@link org.bitcoinj.core.NetworkParameters#getSubsidyDecreaseBlockCount()}. + *

The half-life is controlled by {@link NetworkParameters#getSubsidyDecreaseBlockCount()}. *

*/ public Coin getBlockInflation(int height) { @@ -815,7 +815,7 @@ public class Block extends Message { * Returns the difficulty of the proof of work that this block should meet encoded in compact form. The {@link * BlockChain} verifies that this is not too easy by looking at the length of the chain when the block is added. * To find the actual value the hash should be compared against, use - * {@link org.bitcoinj.core.Block#getDifficultyTargetAsInteger()}. Note that this is not the same as + * {@link Block#getDifficultyTargetAsInteger()}. Note that this is not the same as * the difficulty value reported by the Bitcoin "getdifficulty" RPC that you may see on various block explorers. * That number is the result of applying a formula to the underlying difficulty to normalize the minimum to 1. * Calculating the difficulty that way is currently unsupported. diff --git a/core/src/main/java/org/bitcoinj/core/BlockChain.java b/core/src/main/java/org/bitcoinj/core/BlockChain.java index 6fd6ca22..bb49547d 100644 --- a/core/src/main/java/org/bitcoinj/core/BlockChain.java +++ b/core/src/main/java/org/bitcoinj/core/BlockChain.java @@ -21,8 +21,12 @@ import static com.google.common.base.Preconditions.checkArgument; import org.bitcoinj.store.BlockStore; import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.store.MemoryBlockStore; +import org.bitcoinj.store.SPVBlockStore; import org.bitcoinj.wallet.Wallet; +import org.bitcoinj.wallet.WalletExtension; +import java.io.File; import java.util.ArrayList; import java.util.List; @@ -40,10 +44,10 @@ public class BlockChain extends AbstractBlockChain { /** *

Constructs a BlockChain connected to the given wallet and store. To obtain a {@link Wallet} you can construct * one from scratch, or you can deserialize a saved wallet from disk using - * {@link Wallet#loadFromFile(java.io.File, WalletExtension...)}

+ * {@link Wallet#loadFromFile(File, WalletExtension...)}

* - *

For the store, you should use {@link org.bitcoinj.store.SPVBlockStore} or you could also try a - * {@link org.bitcoinj.store.MemoryBlockStore} if you want to hold all headers in RAM and don't care about + *

For the store, you should use {@link SPVBlockStore} or you could also try a + * {@link MemoryBlockStore} if you want to hold all headers in RAM and don't care about * disk serialization (this is rare).

*/ public BlockChain(Context context, Wallet wallet, BlockStore blockStore) throws BlockStoreException { diff --git a/core/src/main/java/org/bitcoinj/core/BloomFilter.java b/core/src/main/java/org/bitcoinj/core/BloomFilter.java index c289d2af..f7c9cf23 100644 --- a/core/src/main/java/org/bitcoinj/core/BloomFilter.java +++ b/core/src/main/java/org/bitcoinj/core/BloomFilter.java @@ -105,7 +105,7 @@ public class BloomFilter extends Message { * It should be a random value, however secureness of the random value is of no great consequence.

* *

updateFlag is used to control filter behaviour on the server (remote node) side when it encounters a hit. - * See {@link org.bitcoinj.core.BloomFilter.BloomUpdate} for a brief description of each mode. The purpose + * See {@link BloomFilter.BloomUpdate} for a brief description of each mode. The purpose * of this flag is to reduce network round-tripping and avoid over-dirtying the filter for the most common * wallet configurations.

*/ @@ -270,7 +270,7 @@ public class BloomFilter extends Message { } /** - * Returns true if this filter will match anything. See {@link org.bitcoinj.core.BloomFilter#setMatchAll()} + * Returns true if this filter will match anything. See {@link BloomFilter#setMatchAll()} * for when this can be a useful thing to do. */ public synchronized boolean matchesAll() { diff --git a/core/src/main/java/org/bitcoinj/core/CheckpointManager.java b/core/src/main/java/org/bitcoinj/core/CheckpointManager.java index 3b5bfcf5..10579c8f 100644 --- a/core/src/main/java/org/bitcoinj/core/CheckpointManager.java +++ b/core/src/main/java/org/bitcoinj/core/CheckpointManager.java @@ -24,6 +24,7 @@ import com.google.common.hash.Hasher; import com.google.common.hash.Hashing; import com.google.common.io.BaseEncoding; +import org.bitcoinj.store.SPVBlockStore; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,7 +56,7 @@ import static com.google.common.base.Preconditions.*; * * *

Checkpoints are used by the SPV {@link BlockChain} to initialize fresh - * {@link org.bitcoinj.store.SPVBlockStore}s. They are not used by fully validating mode, which instead has a + * {@link SPVBlockStore}s. They are not used by fully validating mode, which instead has a * different concept of checkpoints that are used to hard-code the validity of blocks that violate BIP30 (duplicate * coinbase transactions). Those "checkpoints" can be found in NetworkParameters.

* diff --git a/core/src/main/java/org/bitcoinj/core/Context.java b/core/src/main/java/org/bitcoinj/core/Context.java index af3819ef..30d27e4d 100644 --- a/core/src/main/java/org/bitcoinj/core/Context.java +++ b/core/src/main/java/org/bitcoinj/core/Context.java @@ -16,6 +16,7 @@ package org.bitcoinj.core; +import org.bitcoinj.utils.ContextPropagatingThreadFactory; import org.bitcoinj.wallet.SendRequest; import org.slf4j.*; @@ -119,7 +120,7 @@ public class Context { } /** - * Require that new threads use {@link #propagate(Context)} or {@link org.bitcoinj.utils.ContextPropagatingThreadFactory}, + * Require that new threads use {@link #propagate(Context)} or {@link ContextPropagatingThreadFactory}, * rather than using a heuristic for the desired context. */ public static void enableStrictMode() { @@ -145,7 +146,7 @@ public class Context { * Sets the given context as the current thread context. You should use this if you create your own threads that * want to create core BitcoinJ objects. Generally, if a class can accept a Context in its constructor and might * be used (even indirectly) by a thread, you will want to call this first. Your task may be simplified by using - * a {@link org.bitcoinj.utils.ContextPropagatingThreadFactory}. + * a {@link ContextPropagatingThreadFactory}. */ public static void propagate(Context context) { slot.set(checkNotNull(context)); @@ -162,7 +163,7 @@ public class Context { } /** - * Returns the {@link org.bitcoinj.core.NetworkParameters} specified when this context was (auto) created. The + * Returns the {@link NetworkParameters} specified when this context was (auto) created. The * network parameters defines various hard coded constants for a specific instance of a Bitcoin network, such as * main net, testnet, etc. */ diff --git a/core/src/main/java/org/bitcoinj/core/ECKey.java b/core/src/main/java/org/bitcoinj/core/ECKey.java index af280acf..103a5add 100644 --- a/core/src/main/java/org/bitcoinj/core/ECKey.java +++ b/core/src/main/java/org/bitcoinj/core/ECKey.java @@ -624,7 +624,7 @@ public class ECKey implements EncryptableItem { /** * Signs the given hash and returns the R and S components as BigIntegers. In the Bitcoin protocol, they are - * usually encoded using ASN.1 format, so you want {@link org.bitcoinj.core.ECKey.ECDSASignature#toASN1()} + * usually encoded using ASN.1 format, so you want {@link ECKey.ECDSASignature#toASN1()} * instead. However sometimes the independent components can be useful, for instance, if you're going to do * further EC maths on them. * @throws KeyCrypterException if this ECKey doesn't have a private part. @@ -643,7 +643,7 @@ public class ECKey implements EncryptableItem { /** * Signs the given hash and returns the R and S components as BigIntegers. In the Bitcoin protocol, they are - * usually encoded using DER format, so you want {@link org.bitcoinj.core.ECKey.ECDSASignature#encodeToDER()} + * usually encoded using DER format, so you want {@link ECKey.ECDSASignature#encodeToDER()} * instead. However sometimes the independent components can be useful, for instance, if you're doing to do further * EC maths on them. * @@ -1028,7 +1028,7 @@ public class ECKey implements EncryptableItem { /** * Exports the private key in the form used by Bitcoin Core's "dumpprivkey" and "importprivkey" commands. Use - * the {@link org.bitcoinj.core.DumpedPrivateKey#toString()} method to get the string. + * the {@link DumpedPrivateKey#toString()} method to get the string. * * @param params The network this key is intended for use on. * @return Private key bytes as a {@link DumpedPrivateKey}. diff --git a/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java b/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java index a66cde95..901fc7b9 100644 --- a/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java +++ b/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java @@ -24,10 +24,12 @@ import org.bitcoinj.store.BlockStoreException; import org.bitcoinj.store.FullPrunedBlockStore; import org.bitcoinj.utils.*; import org.bitcoinj.wallet.Wallet; +import org.bitcoinj.wallet.WalletExtension; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Nullable; +import java.io.File; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @@ -59,7 +61,7 @@ public class FullPrunedBlockChain extends AbstractBlockChain { /** * Constructs a block chain connected to the given wallet and store. To obtain a {@link Wallet} you can construct * one from scratch, or you can deserialize a saved wallet from disk using - * {@link Wallet#loadFromFile(java.io.File, WalletExtension...)} + * {@link Wallet#loadFromFile(File, WalletExtension...)} */ public FullPrunedBlockChain(Context context, Wallet wallet, FullPrunedBlockStore blockStore) throws BlockStoreException { this(context, new ArrayList(), blockStore); @@ -69,7 +71,7 @@ public class FullPrunedBlockChain extends AbstractBlockChain { /** * Constructs a block chain connected to the given wallet and store. To obtain a {@link Wallet} you can construct * one from scratch, or you can deserialize a saved wallet from disk using - * {@link Wallet#loadFromFile(java.io.File, WalletExtension...)} + * {@link Wallet#loadFromFile(File, WalletExtension...)} */ public FullPrunedBlockChain(NetworkParameters params, Wallet wallet, FullPrunedBlockStore blockStore) throws BlockStoreException { this(Context.getOrCreate(params), wallet, blockStore); diff --git a/core/src/main/java/org/bitcoinj/core/Message.java b/core/src/main/java/org/bitcoinj/core/Message.java index 9cdb583e..38d19670 100644 --- a/core/src/main/java/org/bitcoinj/core/Message.java +++ b/core/src/main/java/org/bitcoinj/core/Message.java @@ -370,7 +370,7 @@ public abstract class Message { /** * Set the serializer for this message when deserialized by Java. */ - private void readObject(java.io.ObjectInputStream in) + private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); if (null != params) { diff --git a/core/src/main/java/org/bitcoinj/core/NetworkParameters.java b/core/src/main/java/org/bitcoinj/core/NetworkParameters.java index c76a6187..94bc0bc6 100644 --- a/core/src/main/java/org/bitcoinj/core/NetworkParameters.java +++ b/core/src/main/java/org/bitcoinj/core/NetworkParameters.java @@ -286,7 +286,7 @@ public abstract class NetworkParameters { return addrSeeds; } - /** Returns discovery objects for seeds implementing the Cartographer protocol. See {@link org.bitcoinj.net.discovery.HttpDiscovery} for more info. */ + /** Returns discovery objects for seeds implementing the Cartographer protocol. See {@link HttpDiscovery} for more info. */ public HttpDiscovery.Details[] getHttpSeeds() { return httpSeeds; } @@ -317,7 +317,7 @@ public abstract class NetworkParameters { } /** - * First byte of a base58 encoded address. See {@link org.bitcoinj.core.LegacyAddress}. This is the same as acceptableAddressCodes[0] and + * First byte of a base58 encoded address. See {@link LegacyAddress}. This is the same as acceptableAddressCodes[0] and * is the one used for "normal" addresses. Other types of address may be encountered with version codes found in * the acceptableAddressCodes array. */ @@ -332,7 +332,7 @@ public abstract class NetworkParameters { return p2shHeader; } - /** First byte of a base58 encoded dumped private key. See {@link org.bitcoinj.core.DumpedPrivateKey}. */ + /** First byte of a base58 encoded dumped private key. See {@link DumpedPrivateKey}. */ public int getDumpedPrivateKeyHeader() { return dumpedPrivateKeyHeader; } @@ -369,7 +369,7 @@ public abstract class NetworkParameters { } /** - * The key used to sign {@link org.bitcoinj.core.AlertMessage}s. You can use {@link org.bitcoinj.core.ECKey#verify(byte[], byte[], byte[])} to verify + * The key used to sign {@link AlertMessage}s. You can use {@link ECKey#verify(byte[], byte[], byte[])} to verify * signatures using it. */ public byte[] getAlertSigningKey() { diff --git a/core/src/main/java/org/bitcoinj/core/Peer.java b/core/src/main/java/org/bitcoinj/core/Peer.java index 2d13343d..b88db81e 100644 --- a/core/src/main/java/org/bitcoinj/core/Peer.java +++ b/core/src/main/java/org/bitcoinj/core/Peer.java @@ -19,6 +19,9 @@ package org.bitcoinj.core; import com.google.common.base.*; import com.google.common.base.Objects; import org.bitcoinj.core.listeners.*; +import org.bitcoinj.net.AbstractTimeoutHandler; +import org.bitcoinj.net.NioClient; +import org.bitcoinj.net.NioClientManager; import org.bitcoinj.net.StreamConnection; import org.bitcoinj.store.BlockStore; import org.bitcoinj.store.BlockStoreException; @@ -36,6 +39,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Nullable; +import java.net.SocketAddress; import java.util.*; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArraySet; @@ -51,8 +55,8 @@ import static com.google.common.base.Preconditions.checkState; * handles low-level message (de)serialization.

* *

Note that timeouts are handled by the extended - * {@link org.bitcoinj.net.AbstractTimeoutHandler} and timeout is automatically disabled (using - * {@link org.bitcoinj.net.AbstractTimeoutHandler#setTimeoutEnabled(boolean)}) once the version + * {@link AbstractTimeoutHandler} and timeout is automatically disabled (using + * {@link AbstractTimeoutHandler#setTimeoutEnabled(boolean)}) once the version * handshake completes.

*/ public class Peer extends PeerSocketHandler { @@ -178,9 +182,9 @@ public class Peer extends PeerSocketHandler { * *

Note that this does NOT make a connection to the given remoteAddress, it only creates a handler for a * connection. If you want to create a one-off connection, create a Peer and pass it to - * {@link org.bitcoinj.net.NioClientManager#openConnection(java.net.SocketAddress, StreamConnection)} + * {@link NioClientManager#openConnection(SocketAddress, StreamConnection)} * or - * {@link org.bitcoinj.net.NioClient#NioClient(java.net.SocketAddress, StreamConnection, int)}.

+ * {@link NioClient#NioClient(SocketAddress, StreamConnection, int)}.

* *

The remoteAddress provided should match the remote address of the peer which is being connected to, and is * used to keep track of which peers relayed transactions and offer more descriptive logging.

@@ -190,15 +194,15 @@ public class Peer extends PeerSocketHandler { } /** - *

Construct a peer that reads/writes from the given block chain. Transactions stored in a {@link org.bitcoinj.core.TxConfidenceTable} + *

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 * the transaction is valid.

* *

Note that this does NOT make a connection to the given remoteAddress, it only creates a handler for a * connection. If you want to create a one-off connection, create a Peer and pass it to - * {@link org.bitcoinj.net.NioClientManager#openConnection(java.net.SocketAddress, StreamConnection)} + * {@link NioClientManager#openConnection(SocketAddress, StreamConnection)} * or - * {@link org.bitcoinj.net.NioClient#NioClient(java.net.SocketAddress, StreamConnection, int)}.

+ * {@link NioClient#NioClient(SocketAddress, StreamConnection, int)}.

* *

The remoteAddress provided should match the remote address of the peer which is being connected to, and is * used to keep track of which peers relayed transactions and offer more descriptive logging.

@@ -209,15 +213,15 @@ public class Peer extends PeerSocketHandler { } /** - *

Construct a peer that reads/writes from the given block chain. Transactions stored in a {@link org.bitcoinj.core.TxConfidenceTable} + *

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 * the transaction is valid.

* *

Note that this does NOT make a connection to the given remoteAddress, it only creates a handler for a * connection. If you want to create a one-off connection, create a Peer and pass it to - * {@link org.bitcoinj.net.NioClientManager#openConnection(java.net.SocketAddress, StreamConnection)} + * {@link NioClientManager#openConnection(SocketAddress, StreamConnection)} * or - * {@link org.bitcoinj.net.NioClient#NioClient(java.net.SocketAddress, StreamConnection, int)}.

+ * {@link NioClient#NioClient(SocketAddress, StreamConnection, int)}.

* *

The remoteAddress provided should match the remote address of the peer which is being connected to, and is * used to keep track of which peers relayed transactions and offer more descriptive logging.

@@ -253,9 +257,9 @@ public class Peer extends PeerSocketHandler { * *

Note that this does NOT make a connection to the given remoteAddress, it only creates a handler for a * connection. If you want to create a one-off connection, create a Peer and pass it to - * {@link org.bitcoinj.net.NioClientManager#openConnection(java.net.SocketAddress, StreamConnection)} + * {@link NioClientManager#openConnection(SocketAddress, StreamConnection)} * or - * {@link org.bitcoinj.net.NioClient#NioClient(java.net.SocketAddress, StreamConnection, int)}.

+ * {@link NioClient#NioClient(SocketAddress, StreamConnection, int)}.

* *

The remoteAddress provided should match the remote address of the peer which is being connected to, and is * used to keep track of which peers relayed transactions and offer more descriptive logging.

@@ -1559,7 +1563,7 @@ public class Peer extends PeerSocketHandler { /** * Sends the peer a ping message and returns a future that will be invoked when the pong is received back. * The future provides a number which is the number of milliseconds elapsed between the ping and the pong. - * Once the pong is received the value returned by {@link org.bitcoinj.core.Peer#getLastPingTime()} is + * Once the pong is received the value returned by {@link Peer#getLastPingTime()} is * updated. * @throws ProtocolException if the peer version is too low to support measurable pings. */ @@ -1578,7 +1582,7 @@ public class Peer extends PeerSocketHandler { } /** - * Returns the elapsed time of the last ping/pong cycle. If {@link org.bitcoinj.core.Peer#ping()} has never + * Returns the elapsed time of the last ping/pong cycle. If {@link Peer#ping()} has never * been called or we did not hear back the "pong" message yet, returns {@link Long#MAX_VALUE}. */ public long getLastPingTime() { @@ -1593,7 +1597,7 @@ public class Peer extends PeerSocketHandler { } /** - * Returns a moving average of the last N ping/pong cycles. If {@link org.bitcoinj.core.Peer#ping()} has never + * Returns a moving average of the last N ping/pong cycles. If {@link Peer#ping()} has never * been called or we did not hear back the "pong" message yet, returns {@link Long#MAX_VALUE}. The moving average * window is 5 buckets. */ diff --git a/core/src/main/java/org/bitcoinj/core/PeerFilterProvider.java b/core/src/main/java/org/bitcoinj/core/PeerFilterProvider.java index ebc72076..84a362a0 100644 --- a/core/src/main/java/org/bitcoinj/core/PeerFilterProvider.java +++ b/core/src/main/java/org/bitcoinj/core/PeerFilterProvider.java @@ -19,7 +19,7 @@ package org.bitcoinj.core; /** * An interface which provides the information required to properly filter data downloaded from Peers. - * Note that an implementer is responsible for calling {@link PeerGroup#recalculateFastCatchupAndFilter(org.bitcoinj.core.PeerGroup.FilterRecalculateMode)} + * Note that an implementer is responsible for calling {@link PeerGroup#recalculateFastCatchupAndFilter(PeerGroup.FilterRecalculateMode)} * whenever a change occurs which effects the data provided via this interface. */ public interface PeerFilterProvider { diff --git a/core/src/main/java/org/bitcoinj/core/PeerGroup.java b/core/src/main/java/org/bitcoinj/core/PeerGroup.java index d6ceec51..e4fa8f23 100644 --- a/core/src/main/java/org/bitcoinj/core/PeerGroup.java +++ b/core/src/main/java/org/bitcoinj/core/PeerGroup.java @@ -1334,7 +1334,7 @@ public class PeerGroup implements TransactionBroadcaster { /** * Returns the number of currently connected peers. To be informed when this count changes, register a - * {@link org.bitcoinj.core.listeners.PeerConnectionEventListener} and use the onPeerConnected/onPeerDisconnected methods. + * {@link PeerConnectionEventListener} and use the onPeerConnected/onPeerDisconnected methods. */ public int numConnectedPeers() { return peers.size(); @@ -1346,7 +1346,7 @@ public class PeerGroup implements TransactionBroadcaster { * * @param address destination IP and port. * @return The newly created Peer object or null if the peer could not be connected. - * Use {@link org.bitcoinj.core.Peer#getConnectionOpenFuture()} if you + * Use {@link Peer#getConnectionOpenFuture()} if you * want a future which completes when the connection is open. */ @Nullable @@ -1903,7 +1903,7 @@ public class PeerGroup implements TransactionBroadcaster { /** * Returns a future that is triggered when the number of connected peers is equal to the given number of - * peers. By using this with {@link org.bitcoinj.core.PeerGroup#getMaxConnections()} you can wait until the + * peers. By using this with {@link PeerGroup#getMaxConnections()} you can wait until the * network is fully online. To block immediately, just call get() on the result. Just calls * {@link #waitForPeersOfVersion(int, long)} with zero as the protocol version. * @@ -2009,7 +2009,7 @@ public class PeerGroup implements TransactionBroadcaster { * enough, {@link PeerGroup#broadcastTransaction(Transaction)} will wait until the minimum number is reached so * propagation across the network can be observed. If no value has been set using * {@link PeerGroup#setMinBroadcastConnections(int)} a default of 80% of whatever - * {@link org.bitcoinj.core.PeerGroup#getMaxConnections()} returns is used. + * {@link PeerGroup#getMaxConnections()} returns is used. */ public int getMinBroadcastConnections() { lock.lock(); @@ -2028,7 +2028,7 @@ public class PeerGroup implements TransactionBroadcaster { } /** - * See {@link org.bitcoinj.core.PeerGroup#getMinBroadcastConnections()}. + * See {@link PeerGroup#getMinBroadcastConnections()}. */ public void setMinBroadcastConnections(int value) { lock.lock(); @@ -2051,7 +2051,7 @@ public class PeerGroup implements TransactionBroadcaster { /** *

Given a transaction, sends it un-announced to one peer and then waits for it to be received back from other * peers. Once all connected peers have announced the transaction, the future available via the - * {@link org.bitcoinj.core.TransactionBroadcast#future()} method will be completed. If anything goes + * {@link TransactionBroadcast#future()} method will be completed. If anything goes * wrong the exception will be thrown when get() is called, or you can receive it via a callback on the * {@link ListenableFuture}. This method returns immediately, so if you want it to block just call get() on the * result.

@@ -2063,7 +2063,7 @@ public class PeerGroup implements TransactionBroadcaster { * A good choice for proportion would be between 0.5 and 0.8 but if you want faster transmission during initial * bringup of the peer group you can lower it.

* - *

The returned {@link org.bitcoinj.core.TransactionBroadcast} object can be used to get progress feedback, + *

The returned {@link TransactionBroadcast} object can be used to get progress feedback, * which is calculated by watching the transaction propagate across the network and be announced by peers.

*/ public TransactionBroadcast broadcastTransaction(final Transaction tx, final int minConnections) { @@ -2114,7 +2114,7 @@ public class PeerGroup implements TransactionBroadcaster { /** * Returns the period between pings for an individual peer. Setting this lower means more accurate and timely ping - * times are available via {@link org.bitcoinj.core.Peer#getLastPingTime()} but it increases load on the + * times are available via {@link Peer#getLastPingTime()} but it increases load on the * remote node. It defaults to {@link PeerGroup#DEFAULT_PING_INTERVAL_MSEC}. */ public long getPingIntervalMsec() { @@ -2128,10 +2128,10 @@ public class PeerGroup implements TransactionBroadcaster { /** * Sets the period between pings for an individual peer. Setting this lower means more accurate and timely ping - * times are available via {@link org.bitcoinj.core.Peer#getLastPingTime()} but it increases load on the + * times are available via {@link Peer#getLastPingTime()} but it increases load on the * remote node. It defaults to {@link PeerGroup#DEFAULT_PING_INTERVAL_MSEC}. * Setting the value to be smaller or equals 0 disables pinging entirely, although you can still request one yourself - * using {@link org.bitcoinj.core.Peer#ping()}. + * using {@link Peer#ping()}. */ public void setPingIntervalMsec(long pingIntervalMsec) { lock.lock(); diff --git a/core/src/main/java/org/bitcoinj/core/Transaction.java b/core/src/main/java/org/bitcoinj/core/Transaction.java index 39b75c7a..5a15e854 100644 --- a/core/src/main/java/org/bitcoinj/core/Transaction.java +++ b/core/src/main/java/org/bitcoinj/core/Transaction.java @@ -838,7 +838,7 @@ public class Transaction extends ChildMessage { } /** - * Same as {@link #addSignedInput(TransactionOutPoint, org.bitcoinj.script.Script, ECKey, org.bitcoinj.core.Transaction.SigHash, boolean)} + * Same as {@link #addSignedInput(TransactionOutPoint, Script, ECKey, Transaction.SigHash, boolean)} * but defaults to {@link SigHash#ALL} and "false" for the anyoneCanPay flag. This is normally what you want. */ public TransactionInput addSignedInput(TransactionOutPoint prevOut, Script scriptPubKey, ECKey sigKey) throws ScriptException { @@ -912,7 +912,7 @@ public class Transaction extends ChildMessage { /** * Calculates a signature that is valid for being inserted into the input at the given position. This is simply - * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], org.bitcoinj.core.Transaction.SigHash, boolean)} + * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], Transaction.SigHash, boolean)} * followed by {@link ECKey#sign(Sha256Hash)} and then returning a new {@link TransactionSignature}. The key * must be usable for signing as-is: if the key is encrypted it must be decrypted first external to this method. * @@ -932,7 +932,7 @@ public class Transaction extends ChildMessage { /** * Calculates a signature that is valid for being inserted into the input at the given position. This is simply - * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], org.bitcoinj.core.Transaction.SigHash, boolean)} + * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], Transaction.SigHash, boolean)} * followed by {@link ECKey#sign(Sha256Hash)} and then returning a new {@link TransactionSignature}. * * @param inputIndex Which input to calculate the signature for, as an index. @@ -951,7 +951,7 @@ public class Transaction extends ChildMessage { /** * Calculates a signature that is valid for being inserted into the input at the given position. This is simply - * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], org.bitcoinj.core.Transaction.SigHash, boolean)} + * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], Transaction.SigHash, boolean)} * followed by {@link ECKey#sign(Sha256Hash)} and then returning a new {@link TransactionSignature}. The key * must be usable for signing as-is: if the key is encrypted it must be decrypted first external to this method. * @@ -973,7 +973,7 @@ public class Transaction extends ChildMessage { /** * Calculates a signature that is valid for being inserted into the input at the given position. This is simply - * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], org.bitcoinj.core.Transaction.SigHash, boolean)} + * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], Transaction.SigHash, boolean)} * followed by {@link ECKey#sign(Sha256Hash)} and then returning a new {@link TransactionSignature}. * * @param inputIndex Which input to calculate the signature for, as an index. @@ -1221,7 +1221,7 @@ public class Transaction extends ChildMessage { } /** - * Returns the confidence object for this transaction from the {@link org.bitcoinj.core.TxConfidenceTable} + * Returns the confidence object for this transaction from the {@link TxConfidenceTable} * referenced by the implicit {@link Context}. */ public TransactionConfidence getConfidence() { @@ -1229,7 +1229,7 @@ public class Transaction extends ChildMessage { } /** - * Returns the confidence object for this transaction from the {@link org.bitcoinj.core.TxConfidenceTable} + * Returns the confidence object for this transaction from the {@link TxConfidenceTable} * referenced by the given {@link Context}. */ public TransactionConfidence getConfidence(Context context) { @@ -1237,7 +1237,7 @@ public class Transaction extends ChildMessage { } /** - * Returns the confidence object for this transaction from the {@link org.bitcoinj.core.TxConfidenceTable} + * Returns the confidence object for this transaction from the {@link TxConfidenceTable} */ public TransactionConfidence getConfidence(TxConfidenceTable table) { if (confidence == null) diff --git a/core/src/main/java/org/bitcoinj/core/TransactionBag.java b/core/src/main/java/org/bitcoinj/core/TransactionBag.java index e391adca..dfbf0592 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionBag.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionBag.java @@ -17,12 +17,13 @@ package org.bitcoinj.core; import org.bitcoinj.script.Script; +import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.WalletTransaction; import java.util.Map; /** - * This interface is used to abstract the {@link org.bitcoinj.wallet.Wallet} and the {@link org.bitcoinj.core.Transaction} + * This interface is used to abstract the {@link Wallet} and the {@link Transaction} */ public interface TransactionBag { /** Returns true if this wallet contains a public key which hashes to the given hash. */ diff --git a/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java b/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java index a45a8ebc..434f11e6 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java @@ -263,7 +263,7 @@ public class TransactionBroadcast { /** * Sets the given callback for receiving progress values, which will run on the user thread. See - * {@link org.bitcoinj.utils.Threading} for details. If the broadcast has already started then the callback will + * {@link Threading} for details. If the broadcast has already started then the callback will * be invoked immediately with the current progress. */ public void setProgressCallback(ProgressCallback callback) { diff --git a/core/src/main/java/org/bitcoinj/core/TransactionBroadcaster.java b/core/src/main/java/org/bitcoinj/core/TransactionBroadcaster.java index da6c1877..87b295d6 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionBroadcaster.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionBroadcaster.java @@ -18,7 +18,7 @@ package org.bitcoinj.core; /** * A general interface which declares the ability to broadcast transactions. This is implemented - * by {@link org.bitcoinj.core.PeerGroup}. + * by {@link PeerGroup}. */ public interface TransactionBroadcaster { /** Broadcast the given transaction on the network */ diff --git a/core/src/main/java/org/bitcoinj/core/TransactionConfidence.java b/core/src/main/java/org/bitcoinj/core/TransactionConfidence.java index 9fc0b629..1f80cc53 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionConfidence.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionConfidence.java @@ -22,6 +22,7 @@ import com.google.common.util.concurrent.*; import org.bitcoinj.core.listeners.BlockChainListener; import org.bitcoinj.utils.*; +import org.bitcoinj.wallet.CoinSelector; import org.bitcoinj.wallet.Wallet; import javax.annotation.*; @@ -56,9 +57,9 @@ import static com.google.common.base.Preconditions.*; *

Alternatively, you may know that the transaction is "dead", that is, one or more of its inputs have * been double spent and will never confirm unless there is another re-org.

* - *

TransactionConfidence is updated via the {@link org.bitcoinj.core.TransactionConfidence#incrementDepthInBlocks()} + *

TransactionConfidence is updated via the {@link TransactionConfidence#incrementDepthInBlocks()} * method to ensure the block depth is up to date.

- * To make a copy that won't be changed, use {@link org.bitcoinj.core.TransactionConfidence#duplicate()}. + * To make a copy that won't be changed, use {@link TransactionConfidence#duplicate()}. */ public class TransactionConfidence { @@ -88,7 +89,7 @@ public class TransactionConfidence { * announced and is considered valid by the network. A pending transaction will be announced if the containing * wallet has been attached to a live {@link PeerGroup} using {@link PeerGroup#addWallet(Wallet)}. * You can estimate how likely the transaction is to be included by connecting to a bunch of nodes then measuring - * how many announce it, using {@link org.bitcoinj.core.TransactionConfidence#numBroadcastPeers()}. + * how many announce it, using {@link TransactionConfidence#numBroadcastPeers()}. * Or if you saw it from a trusted peer, you can assume it's valid and will get mined sooner or later as well. */ PENDING(2), @@ -165,7 +166,7 @@ public class TransactionConfidence { /** An enum that describes why a transaction confidence listener is being invoked (i.e. the class of change). */ enum ChangeReason { /** - * Occurs when the type returned by {@link org.bitcoinj.core.TransactionConfidence#getConfidenceType()} + * Occurs when the type returned by {@link TransactionConfidence#getConfidenceType()} * has changed. For example, if a PENDING transaction changes to BUILDING or DEAD, then this reason will * be given. It's a high level summary. */ @@ -464,7 +465,7 @@ public class TransactionConfidence { /** * The source of a transaction tries to identify where it came from originally. For instance, did we download it * from the peer to peer network, or make it ourselves, or receive it via Bluetooth, or import it from another app, - * and so on. This information is useful for {@link org.bitcoinj.wallet.CoinSelector} implementations to risk analyze + * and so on. This information is useful for {@link CoinSelector} implementations to risk analyze * transactions and decide when to spend them. */ public synchronized Source getSource() { @@ -474,7 +475,7 @@ public class TransactionConfidence { /** * The source of a transaction tries to identify where it came from originally. For instance, did we download it * from the peer to peer network, or make it ourselves, or receive it via Bluetooth, or import it from another app, - * and so on. This information is useful for {@link org.bitcoinj.wallet.CoinSelector} implementations to risk analyze + * and so on. This information is useful for {@link CoinSelector} implementations to risk analyze * transactions and decide when to spend them. */ public synchronized void setSource(Source source) { diff --git a/core/src/main/java/org/bitcoinj/core/TransactionInput.java b/core/src/main/java/org/bitcoinj/core/TransactionInput.java index 756912f2..9a2aed38 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionInput.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionInput.java @@ -288,7 +288,7 @@ public class TransactionInput extends ChildMessage { /** * Alias for getOutpoint().getConnectedRedeemData(keyBag) - * @see TransactionOutPoint#getConnectedRedeemData(org.bitcoinj.wallet.KeyBag) + * @see TransactionOutPoint#getConnectedRedeemData(KeyBag) */ @Nullable public RedeemData getConnectedRedeemData(KeyBag keyBag) throws ScriptException { diff --git a/core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java b/core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java index d2ff0b5c..0d5ee7d5 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java @@ -130,7 +130,7 @@ public class TransactionOutPoint extends ChildMessage { /** * Returns the ECKey identified in the connected output, for either P2PKH scripts or P2PK scripts. - * For P2SH scripts you can use {@link #getConnectedRedeemData(org.bitcoinj.wallet.KeyBag)} and then get the + * For P2SH scripts you can use {@link #getConnectedRedeemData(KeyBag)} and then get the * key from RedeemData. * If the script form cannot be understood, throws ScriptException. * diff --git a/core/src/main/java/org/bitcoinj/core/TransactionOutput.java b/core/src/main/java/org/bitcoinj/core/TransactionOutput.java index a4688b6b..8dcf7924 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionOutput.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionOutput.java @@ -204,7 +204,7 @@ public class TransactionOutput extends ChildMessage { * so we call them "dust outputs" and they're made non standard. The choice of one third is somewhat arbitrary and * may change in future.

* - *

You probably should use {@link org.bitcoinj.core.TransactionOutput#getMinNonDustValue()} which uses + *

You probably should use {@link TransactionOutput#getMinNonDustValue()} which uses * a safe fee-per-kb by default.

* * @param feePerKb The fee required per kilobyte. Note that this is the same as Bitcoin Core's -minrelaytxfee * 3 diff --git a/core/src/main/java/org/bitcoinj/core/TxConfidenceTable.java b/core/src/main/java/org/bitcoinj/core/TxConfidenceTable.java index e26d9faf..0552e5c9 100644 --- a/core/src/main/java/org/bitcoinj/core/TxConfidenceTable.java +++ b/core/src/main/java/org/bitcoinj/core/TxConfidenceTable.java @@ -131,7 +131,7 @@ public class TxConfidenceTable { /** * Called by peers when they see a transaction advertised in an "inv" message. It passes the data on to the relevant - * {@link org.bitcoinj.core.TransactionConfidence} object, creating it if needed. + * {@link TransactionConfidence} object, creating it if needed. * * @return the number of peers that have now announced this hash (including the caller) */ diff --git a/core/src/main/java/org/bitcoinj/core/UTXOProvider.java b/core/src/main/java/org/bitcoinj/core/UTXOProvider.java index f956ceb4..2bfb837a 100644 --- a/core/src/main/java/org/bitcoinj/core/UTXOProvider.java +++ b/core/src/main/java/org/bitcoinj/core/UTXOProvider.java @@ -16,13 +16,15 @@ package org.bitcoinj.core; +import org.bitcoinj.store.FullPrunedBlockStore; + import java.util.List; /** * A UTXOProvider encapsulates functionality for returning unspent transaction outputs, * for use by the wallet or other code that crafts spends. * - *

A {@link org.bitcoinj.store.FullPrunedBlockStore} is an internal implementation within bitcoinj.

+ *

A {@link FullPrunedBlockStore} is an internal implementation within bitcoinj.

*/ public interface UTXOProvider { /** diff --git a/core/src/main/java/org/bitcoinj/core/UTXOsMessage.java b/core/src/main/java/org/bitcoinj/core/UTXOsMessage.java index f1192bdd..35a60965 100644 --- a/core/src/main/java/org/bitcoinj/core/UTXOsMessage.java +++ b/core/src/main/java/org/bitcoinj/core/UTXOsMessage.java @@ -17,6 +17,8 @@ package org.bitcoinj.core; import com.google.common.base.Objects; +import org.bitcoinj.net.discovery.HttpDiscovery; + import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; @@ -28,7 +30,7 @@ import java.util.List; * {@link GetUTXOsMessage} ("getutxos"). Note that both this message and the query that generates it are not * supported by Bitcoin Core. An implementation is available in Bitcoin XT, * a patch set on top of Core. Thus if you want to use it, you must find some XT peers to connect to. This can be done - * using a {@link org.bitcoinj.net.discovery.HttpDiscovery} class combined with an HTTP/Cartographer seed.

+ * using a {@link HttpDiscovery} class combined with an HTTP/Cartographer seed.

* *

The getutxos/utxos protocol is defined in BIP 65. * In that document you can find a discussion of the security of this protocol (briefly, there is none). Because the diff --git a/core/src/main/java/org/bitcoinj/core/Utils.java b/core/src/main/java/org/bitcoinj/core/Utils.java index dab17405..4ab173b4 100644 --- a/core/src/main/java/org/bitcoinj/core/Utils.java +++ b/core/src/main/java/org/bitcoinj/core/Utils.java @@ -60,7 +60,7 @@ public class Utils { /** *

- * The regular {@link java.math.BigInteger#toByteArray()} includes the sign bit of the number and + * The regular {@link BigInteger#toByteArray()} includes the sign bit of the number and * might result in an extra byte addition. This method removes this extra byte. *

*

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 2fbc1e0c..2a67866a 100644 --- a/core/src/main/java/org/bitcoinj/core/listeners/GetDataEventListener.java +++ b/core/src/main/java/org/bitcoinj/core/listeners/GetDataEventListener.java @@ -17,6 +17,7 @@ package org.bitcoinj.core.listeners; import org.bitcoinj.core.*; +import org.bitcoinj.utils.Threading; import javax.annotation.*; import java.util.*; @@ -33,7 +34,7 @@ public interface GetDataEventListener { * items as possible which appear in the {@link GetDataMessage}, or null if you're not interested in responding.

* *

Note that this will never be called if registered with any executor other than - * {@link org.bitcoinj.utils.Threading#SAME_THREAD}

+ * {@link Threading#SAME_THREAD}

*/ @Nullable List getData(Peer peer, GetDataMessage m); diff --git a/core/src/main/java/org/bitcoinj/core/listeners/NewBestBlockListener.java b/core/src/main/java/org/bitcoinj/core/listeners/NewBestBlockListener.java index b8572989..93eb04b2 100644 --- a/core/src/main/java/org/bitcoinj/core/listeners/NewBestBlockListener.java +++ b/core/src/main/java/org/bitcoinj/core/listeners/NewBestBlockListener.java @@ -16,7 +16,10 @@ package org.bitcoinj.core.listeners; +import org.bitcoinj.core.AbstractBlockChain; +import org.bitcoinj.core.Sha256Hash; import org.bitcoinj.core.StoredBlock; +import org.bitcoinj.core.Transaction; import org.bitcoinj.core.VerificationException; /** @@ -26,8 +29,8 @@ public interface NewBestBlockListener { /** * Called when a new block on the best chain is seen, after relevant * transactions are extracted and sent to us via either - * {@link TransactionReceivedInBlockListener#receiveFromBlock(org.bitcoinj.core.Transaction, StoredBlock, org.bitcoinj.core.AbstractBlockChain.NewBlockType, int)} - * or {@link TransactionReceivedInBlockListener#notifyTransactionIsInBlock(org.bitcoinj.core.Sha256Hash, StoredBlock, org.bitcoinj.core.AbstractBlockChain.NewBlockType, int)}. + * {@link TransactionReceivedInBlockListener#receiveFromBlock(Transaction, StoredBlock, AbstractBlockChain.NewBlockType, int)} + * or {@link TransactionReceivedInBlockListener#notifyTransactionIsInBlock(Sha256Hash, StoredBlock, AbstractBlockChain.NewBlockType, int)}. * If this block is causing a re-organise to a new chain, this method is NOT * called even though the block may be the new best block: your reorganize * implementation is expected to do whatever would normally be done do for a 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 ff125643..3bea7ba3 100644 --- a/core/src/main/java/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.java +++ b/core/src/main/java/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.java @@ -17,6 +17,7 @@ package org.bitcoinj.core.listeners; import org.bitcoinj.core.*; +import org.bitcoinj.utils.Threading; /** *

Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, @@ -32,7 +33,7 @@ public interface PreMessageReceivedEventListener { * callback is passed as "m" to the next, forming a chain.

* *

Note that this will never be called if registered with any executor other than - * {@link org.bitcoinj.utils.Threading#SAME_THREAD}

+ * {@link Threading#SAME_THREAD}

*/ Message onPreMessageReceived(Peer peer, Message m); } diff --git a/core/src/main/java/org/bitcoinj/core/listeners/ReorganizeListener.java b/core/src/main/java/org/bitcoinj/core/listeners/ReorganizeListener.java index 67c59bd3..25580cce 100644 --- a/core/src/main/java/org/bitcoinj/core/listeners/ReorganizeListener.java +++ b/core/src/main/java/org/bitcoinj/core/listeners/ReorganizeListener.java @@ -17,6 +17,8 @@ package org.bitcoinj.core.listeners; import java.util.List; + +import org.bitcoinj.core.BlockChain; import org.bitcoinj.core.StoredBlock; import org.bitcoinj.core.VerificationException; @@ -26,7 +28,7 @@ import org.bitcoinj.core.VerificationException; public interface ReorganizeListener { /** - * Called by the {@link org.bitcoinj.core.BlockChain} when the best chain + * Called by the {@link BlockChain} when the best chain * (representing total work done) has changed. In this case, * we need to go through our transactions and find out if any have become invalid. It's possible for our balance * to go down in this case: money we thought we had can suddenly vanish if the rest of the network agrees it diff --git a/core/src/main/java/org/bitcoinj/crypto/ChildNumber.java b/core/src/main/java/org/bitcoinj/crypto/ChildNumber.java index 1952036b..67b9ea98 100644 --- a/core/src/main/java/org/bitcoinj/crypto/ChildNumber.java +++ b/core/src/main/java/org/bitcoinj/crypto/ChildNumber.java @@ -16,13 +16,14 @@ package org.bitcoinj.crypto; +import java.util.List; import java.util.Locale; import com.google.common.primitives.Ints; /** *

This is just a wrapper for the i (child number) as per BIP 32 with a boolean getter for the most significant bit - * and a getter for the actual 0-based child number. A {@link java.util.List} of these forms a path through a + * and a getter for the actual 0-based child number. A {@link List} of these forms a path through a * {@link DeterministicHierarchy}. This class is immutable. */ public class ChildNumber implements Comparable { diff --git a/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java b/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java index 87feca46..d434bec3 100644 --- a/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java +++ b/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java @@ -338,7 +338,7 @@ public class DeterministicKey extends ECKey { } /** - * Returns this keys {@link org.bitcoinj.crypto.KeyCrypter} or the keycrypter of its parent key. + * Returns this keys {@link KeyCrypter} or the keycrypter of its parent key. */ @Override @Nullable public KeyCrypter getKeyCrypter() { @@ -559,7 +559,7 @@ public class DeterministicKey extends ECKey { /** * The creation time of a deterministic key is equal to that of its parent, unless this key is the root of a tree - * in which case the time is stored alongside the key as per normal, see {@link org.bitcoinj.core.ECKey#getCreationTimeSeconds()}. + * in which case the time is stored alongside the key as per normal, see {@link ECKey#getCreationTimeSeconds()}. */ @Override public long getCreationTimeSeconds() { diff --git a/core/src/main/java/org/bitcoinj/crypto/EncryptableItem.java b/core/src/main/java/org/bitcoinj/crypto/EncryptableItem.java index 22c1fec3..3c9fce18 100644 --- a/core/src/main/java/org/bitcoinj/crypto/EncryptableItem.java +++ b/core/src/main/java/org/bitcoinj/crypto/EncryptableItem.java @@ -22,7 +22,7 @@ import javax.annotation.Nullable; /** * Provides a uniform way to access something that can be optionally encrypted with a - * {@link org.bitcoinj.crypto.KeyCrypter}, yielding an {@link org.bitcoinj.crypto.EncryptedData}, and + * {@link KeyCrypter}, yielding an {@link EncryptedData}, and * which can have a creation time associated with it. */ public interface EncryptableItem { diff --git a/core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java b/core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java index 54999de6..0cec411b 100644 --- a/core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java +++ b/core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java @@ -26,7 +26,7 @@ import java.io.IOException; import java.math.BigInteger; /** - * A TransactionSignature wraps an {@link org.bitcoinj.core.ECKey.ECDSASignature} and adds methods for handling + * A TransactionSignature wraps an {@link ECKey.ECDSASignature} and adds methods for handling * the additional SIGHASH mode byte that is used. */ public class TransactionSignature extends ECKey.ECDSASignature { diff --git a/core/src/main/java/org/bitcoinj/crypto/TrustStoreLoader.java b/core/src/main/java/org/bitcoinj/crypto/TrustStoreLoader.java index a3542e8b..90987999 100644 --- a/core/src/main/java/org/bitcoinj/crypto/TrustStoreLoader.java +++ b/core/src/main/java/org/bitcoinj/crypto/TrustStoreLoader.java @@ -27,7 +27,7 @@ import java.security.KeyStoreException; /** * An implementation of TrustStoreLoader handles fetching a KeyStore from the operating system, a file, etc. It's - * necessary because the Java {@link java.security.KeyStore} abstraction is not completely seamless and for example + * necessary because the Java {@link KeyStore} abstraction is not completely seamless and for example * we sometimes need slightly different techniques to load the key store on different versions of Android, MacOS, * Windows, etc. */ diff --git a/core/src/main/java/org/bitcoinj/crypto/X509Utils.java b/core/src/main/java/org/bitcoinj/crypto/X509Utils.java index 074468f7..76281b36 100644 --- a/core/src/main/java/org/bitcoinj/crypto/X509Utils.java +++ b/core/src/main/java/org/bitcoinj/crypto/X509Utils.java @@ -17,6 +17,7 @@ package org.bitcoinj.crypto; import com.google.common.base.Joiner; +import org.bitcoinj.protocols.payments.PaymentSession; import org.spongycastle.asn1.ASN1ObjectIdentifier; import org.spongycastle.asn1.ASN1String; import org.spongycastle.asn1.x500.AttributeTypeAndValue; @@ -38,7 +39,7 @@ import java.util.List; /** * X509Utils provides tools for working with X.509 certificates and keystores, as used in the BIP 70 payment protocol. - * For more details on this, see {@link org.bitcoinj.protocols.payments.PaymentSession}, the article "Working with + * For more details on this, see {@link PaymentSession}, the article "Working with * the payment protocol" on the bitcoinj website, or the Bitcoin developer guide. */ public class X509Utils { diff --git a/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java b/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java index ba53ebbd..5cae14e5 100644 --- a/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java +++ b/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java @@ -56,7 +56,7 @@ import static com.google.common.base.Preconditions.*; * means doing potentially blocking file IO, generating keys and other potentially intensive operations. By running it * on a background thread, there's no risk of accidentally causing UI lag.

* - *

Note that {@link #awaitRunning()} can throw an unchecked {@link java.lang.IllegalStateException} + *

Note that {@link #awaitRunning()} can throw an unchecked {@link IllegalStateException} * if anything goes wrong during startup - you should probably handle it and use {@link Exception#getCause()} to figure * out what went wrong more precisely. Same thing if you just use the {@link #startAsync()} method.

*/ diff --git a/core/src/main/java/org/bitcoinj/net/FilterMerger.java b/core/src/main/java/org/bitcoinj/net/FilterMerger.java index 2223fe8c..b3425c2a 100644 --- a/core/src/main/java/org/bitcoinj/net/FilterMerger.java +++ b/core/src/main/java/org/bitcoinj/net/FilterMerger.java @@ -20,15 +20,16 @@ import com.google.common.collect.Lists; import org.bitcoinj.core.BloomFilter; import org.bitcoinj.core.PeerFilterProvider; import com.google.common.collect.ImmutableList; +import org.bitcoinj.core.PeerGroup; import java.util.LinkedList; // This code is unit tested by the PeerGroup tests. /** - *

A reusable object that will calculate, given a list of {@link org.bitcoinj.core.PeerFilterProvider}s, a merged - * {@link org.bitcoinj.core.BloomFilter} and earliest key time for all of them. - * Used by the {@link org.bitcoinj.core.PeerGroup} class internally.

+ *

A reusable object that will calculate, given a list of {@link PeerFilterProvider}s, a merged + * {@link BloomFilter} and earliest key time for all of them. + * Used by the {@link PeerGroup} class internally.

* *

Thread safety: threading here can be complicated. Each filter provider is given a begin event, which may acquire * a lock (and is guaranteed to receive an end event). This class is mostly thread unsafe and is meant to be used from a diff --git a/core/src/main/java/org/bitcoinj/params/UnitTestParams.java b/core/src/main/java/org/bitcoinj/params/UnitTestParams.java index d03b4f83..d4c0f4cc 100644 --- a/core/src/main/java/org/bitcoinj/params/UnitTestParams.java +++ b/core/src/main/java/org/bitcoinj/params/UnitTestParams.java @@ -22,7 +22,7 @@ import java.math.BigInteger; /** * Network parameters used by the bitcoinj unit tests (and potentially your own). This lets you solve a block using - * {@link org.bitcoinj.core.Block#solve()} by setting difficulty to the easiest possible. + * {@link Block#solve()} by setting difficulty to the easiest possible. */ public class UnitTestParams extends AbstractBitcoinNetParams { public static final int UNITNET_MAJORITY_WINDOW = 8; diff --git a/core/src/main/java/org/bitcoinj/protocols/channels/IPaymentChannelClient.java b/core/src/main/java/org/bitcoinj/protocols/channels/IPaymentChannelClient.java index 7097e109..510f9bb3 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/IPaymentChannelClient.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/IPaymentChannelClient.java @@ -47,7 +47,7 @@ public interface IPaymentChannelClient { * intending to reopen the channel later. There is likely little reason to use this in a stateless protocol.

* *

Note that this MUST still be called even after either - * {@link org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or + * {@link IPaymentChannelClient.ClientConnection#destroyConnection(PaymentChannelCloseException.CloseReason)} or * {@link IPaymentChannelClient#settle()} is called, to actually handle the connection close logic.

*/ void connectionClosed(); @@ -56,7 +56,7 @@ public interface IPaymentChannelClient { *

Settles the channel, notifying the server it can broadcast the most recent payment transaction.

* *

Note that this only generates a CLOSE message for the server and calls - * {@link org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} + * {@link IPaymentChannelClient.ClientConnection#destroyConnection(PaymentChannelCloseException.CloseReason)} * to settle the connection, it does not actually handle connection close logic, and * {@link PaymentChannelClient#connectionClosed()} must still be called after the connection fully settles.

* @@ -103,25 +103,25 @@ public interface IPaymentChannelClient { * however the order of messages must be preserved.

* *

If the send fails, no exception should be thrown, however - * {@link org.bitcoinj.protocols.channels.PaymentChannelClient#connectionClosed()} should be called immediately. In the case of messages which + * {@link PaymentChannelClient#connectionClosed()} should be called immediately. In the case of messages which * are a part of initialization, initialization will simply fail and the refund transaction will be broadcasted * when it unlocks (if necessary). In the case of a payment message, the payment will be lost however if the * channel is resumed it will begin again from the channel value after the failed payment.

* - *

Called while holding a lock on the {@link org.bitcoinj.protocols.channels.PaymentChannelClient} object - be careful about reentrancy

+ *

Called while holding a lock on the {@link PaymentChannelClient} object - be careful about reentrancy

*/ void sendToServer(Protos.TwoWayChannelMessage msg); /** *

Requests that the connection to the server be closed. For stateless protocols, note that after this call, * no more messages should be received from the server and this object is no longer usable. A - * {@link org.bitcoinj.protocols.channels.PaymentChannelClient#connectionClosed()} event should be generated immediately after this call.

+ * {@link PaymentChannelClient#connectionClosed()} event should be generated immediately after this call.

* - *

Called while holding a lock on the {@link org.bitcoinj.protocols.channels.PaymentChannelClient} object - be careful about reentrancy

+ *

Called while holding a lock on the {@link PaymentChannelClient} object - be careful about reentrancy

* * @param reason The reason for the closure, see the individual values for more details. * It is usually safe to ignore this and treat any value below - * {@link org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason#CLIENT_REQUESTED_CLOSE} as "unrecoverable error" and all others as + * {@link PaymentChannelCloseException.CloseReason#CLIENT_REQUESTED_CLOSE} as "unrecoverable error" and all others as * "try again once and see if it works then" */ void destroyConnection(PaymentChannelCloseException.CloseReason reason); @@ -129,7 +129,7 @@ public interface IPaymentChannelClient { /** *

Queries if the expire time proposed by server is acceptable. If {@code false} is return the channel - * will be closed with a {@link org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason#TIME_WINDOW_UNACCEPTABLE}.

+ * will be closed with a {@link PaymentChannelCloseException.CloseReason#TIME_WINDOW_UNACCEPTABLE}.

* @param expireTime The time, in seconds, when this channel will be closed by the server. Note this is in absolute time, i.e. seconds since 1970-01-01T00:00:00. * @return {@code true} if the proposed time is acceptable {@code false} otherwise. */ @@ -137,10 +137,10 @@ public interface IPaymentChannelClient { /** *

Indicates the channel has been successfully opened and - * {@link org.bitcoinj.protocols.channels.PaymentChannelClient#incrementPayment(Coin)} + * {@link PaymentChannelClient#incrementPayment(Coin)} * may be called at will.

* - *

Called while holding a lock on the {@link org.bitcoinj.protocols.channels.PaymentChannelClient} + *

Called while holding a lock on the {@link PaymentChannelClient} * object - be careful about reentrancy

* * @param wasInitiated If true, the channel is newly opened. If false, it was resumed. @@ -168,7 +168,7 @@ public interface IPaymentChannelClient { /** * The time in seconds, relative to now, on how long this channel should be kept open. Note that is is * a proposal to the server. The server may in turn propose something different. - * See {@link org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#acceptExpireTime(long)} + * See {@link IPaymentChannelClient.ClientConnection#acceptExpireTime(long)} * */ long timeWindow(); diff --git a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClient.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClient.java index 0a78726b..00af3093 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClient.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClient.java @@ -536,7 +536,7 @@ public class PaymentChannelClient implements IPaymentChannelClient { * intending to reopen the channel later. There is likely little reason to use this in a stateless protocol.

* *

Note that this MUST still be called even after either - * {@link org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or + * {@link IPaymentChannelClient.ClientConnection#destroyConnection(PaymentChannelCloseException.CloseReason)} or * {@link PaymentChannelClient#settle()} is called, to actually handle the connection close logic.

*/ @Override @@ -556,7 +556,7 @@ public class PaymentChannelClient implements IPaymentChannelClient { * payment transaction.

* *

Note that this only generates a CLOSE message for the server and calls - * {@link org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} to settle the connection, it does not + * {@link IPaymentChannelClient.ClientConnection#destroyConnection(PaymentChannelCloseException.CloseReason)} to settle the connection, it does not * actually handle connection close logic, and {@link PaymentChannelClient#connectionClosed()} must still be called * after the connection fully closes.

* diff --git a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java index 2c093ff2..1366c21f 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java @@ -50,7 +50,7 @@ public class PaymentChannelClientConnection { /** * Attempts to open a new connection to and open a payment channel with the given host and port, blocking until the * connection is open. The server is requested to keep the channel open for - * {@link org.bitcoinj.protocols.channels.PaymentChannelClient#DEFAULT_TIME_WINDOW} + * {@link PaymentChannelClient#DEFAULT_TIME_WINDOW} * seconds. If the server proposes a longer time the channel will be closed. * * @param server The host/port pair where the server is listening. @@ -75,7 +75,7 @@ public class PaymentChannelClientConnection { /** * Attempts to open a new connection to and open a payment channel with the given host and port, blocking until the * connection is open. The server is requested to keep the channel open for - * {@link org.bitcoinj.protocols.channels.PaymentChannelClient#DEFAULT_TIME_WINDOW} seconds. + * {@link PaymentChannelClient#DEFAULT_TIME_WINDOW} seconds. * If the server proposes a longer time the channel will be closed. * * @param server The host/port pair where the server is listening. @@ -191,7 +191,7 @@ public class PaymentChannelClientConnection { * *

After this future completes successfully, you may call * {@link PaymentChannelClientConnection#incrementPayment(Coin)} or - * {@link PaymentChannelClientConnection#incrementPayment(Coin, com.google.protobuf.ByteString, KeyParameter)} to + * {@link PaymentChannelClientConnection#incrementPayment(Coin, ByteString, KeyParameter)} to * begin paying the server.

*/ public ListenableFuture getChannelOpenFuture() { diff --git a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientState.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientState.java index d900511b..d5f0abe6 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientState.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientState.java @@ -60,7 +60,7 @@ import static com.google.common.base.Preconditions.*; * the given time (within a few hours), the channel must be closed or else the client will broadcast the refund * transaction and take back all the money once the expiry time is reached.

* - *

To begin, the client calls {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)}, which moves the channel into state + *

To begin, the client calls {@link PaymentChannelClientState#initiate(KeyParameter, IPaymentChannelClient.ClientChannelProperties)}, which moves the channel into state * INITIATED and creates the initial multi-sig contract and refund transaction. If the wallet has insufficient funds an * exception will be thrown at this point. Once this is done, call * {@link PaymentChannelV1ClientState#getIncompleteRefundTransaction()} and pass the resultant transaction through to the @@ -126,9 +126,9 @@ public abstract class PaymentChannelClientState { /** * Creates a state object for a payment channel client. It is expected that you be ready to - * {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} after construction (to avoid creating objects for channels which are + * {@link PaymentChannelClientState#initiate(KeyParameter, IPaymentChannelClient.ClientChannelProperties)} after construction (to avoid creating objects for channels which are * not going to finish opening) and thus some parameters provided here are only used in - * {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} to create the Multisig contract and refund transaction. + * {@link PaymentChannelClientState#initiate(KeyParameter, IPaymentChannelClient.ClientChannelProperties)} to create the Multisig contract and refund transaction. * * @param wallet a wallet that contains at least the specified amount of value. * @param myKey a freshly generated private key for this channel. @@ -383,7 +383,7 @@ public abstract class PaymentChannelClientState { /** * Returns the fees that will be paid if the refund transaction has to be claimed because the server failed to settle - * the channel properly. May only be called after {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} + * the channel properly. May only be called after {@link PaymentChannelClientState#initiate(KeyParameter, IPaymentChannelClient.ClientChannelProperties)} */ public abstract Coin getRefundTxFees(); diff --git a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelCloseException.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelCloseException.java index 0c6d6773..4ea8f770 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelCloseException.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelCloseException.java @@ -34,7 +34,7 @@ public class PaymentChannelCloseException extends Exception { // Values after here indicate its probably possible to try reopening channel again /** - *

The {@link org.bitcoinj.protocols.channels.PaymentChannelClient#settle()} method was called or the + *

The {@link PaymentChannelClient#settle()} method was called or the * client sent a CLOSE message.

*

As long as the server received the CLOSE message, this means that the channel is settling and the payment * transaction (if any) will be broadcast. If the client attempts to open a new connection, a new channel will @@ -43,7 +43,7 @@ public class PaymentChannelCloseException extends Exception { CLIENT_REQUESTED_CLOSE, /** - *

The {@link org.bitcoinj.protocols.channels.PaymentChannelServer#close()} method was called or server + *

The {@link PaymentChannelServer#close()} method was called or server * sent a CLOSE message.

* *

This may occur if the server opts to close the connection for some reason, or automatically if the channel diff --git a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServer.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServer.java index 4ec005eb..8dd3dc0a 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServer.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServer.java @@ -595,7 +595,7 @@ public class PaymentChannelServer { * resume this channel in the future and stops generating messages for the client.

* *

Note that this MUST still be called even after either - * {@link org.bitcoinj.protocols.channels.PaymentChannelServer.ServerConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or + * {@link PaymentChannelServer.ServerConnection#destroyConnection(PaymentChannelCloseException.CloseReason)} or * {@link PaymentChannelServer#close()} is called to actually handle the connection close logic.

*/ public void connectionClosed() { @@ -638,7 +638,7 @@ public class PaymentChannelServer { /** *

Closes the connection by generating a settle message for the client and calls - * {@link org.bitcoinj.protocols.channels.PaymentChannelServer.ServerConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)}. Note that this does not broadcast + * {@link PaymentChannelServer.ServerConnection#destroyConnection(PaymentChannelCloseException.CloseReason)}. Note that this does not broadcast * the payment transaction and the client may still resume the same channel if they reconnect

*

*

Note that {@link PaymentChannelServer#connectionClosed()} must still be called after the connection fully diff --git a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV1ClientState.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV1ClientState.java index 232d68f7..7d40e5c3 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV1ClientState.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV1ClientState.java @@ -73,9 +73,9 @@ public class PaymentChannelV1ClientState extends PaymentChannelClientState { /** * Creates a state object for a payment channel client. It is expected that you be ready to - * {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} after construction (to avoid creating objects for channels which are + * {@link PaymentChannelClientState#initiate(KeyParameter, IPaymentChannelClient.ClientChannelProperties)} after construction (to avoid creating objects for channels which are * not going to finish opening) and thus some parameters provided here are only used in - * {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} to create the Multisig contract and refund transaction. + * {@link PaymentChannelClientState#initiate(KeyParameter, IPaymentChannelClient.ClientChannelProperties)} to create the Multisig contract and refund transaction. * * @param wallet a wallet that contains at least the specified amount of value. * @param myKey a freshly generated private key for this channel. diff --git a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV1ServerState.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV1ServerState.java index 708c6db6..8f0a73a9 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV1ServerState.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV1ServerState.java @@ -177,11 +177,11 @@ public class PaymentChannelV1ServerState extends PaymentChannelServerState { /** *

Closes this channel and broadcasts the highest value payment transaction on the network.

* - *

This will set the state to {@link org.bitcoinj.protocols.channels.PaymentChannelServerState.State#CLOSED} if the transaction is successfully broadcast on the network. - * If we fail to broadcast for some reason, the state is set to {@link org.bitcoinj.protocols.channels.PaymentChannelServerState.State#ERROR}.

+ *

This will set the state to {@link PaymentChannelServerState.State#CLOSED} if the transaction is successfully broadcast on the network. + * If we fail to broadcast for some reason, the state is set to {@link PaymentChannelServerState.State#ERROR}.

* - *

If the current state is before {@link org.bitcoinj.protocols.channels.PaymentChannelServerState.State#READY} (ie we have not finished initializing the channel), we - * simply set the state to {@link org.bitcoinj.protocols.channels.PaymentChannelServerState.State#CLOSED} and let the client handle getting its refund transaction confirmed. + *

If the current state is before {@link PaymentChannelServerState.State#READY} (ie we have not finished initializing the channel), we + * simply set the state to {@link PaymentChannelServerState.State#CLOSED} and let the client handle getting its refund transaction confirmed. *

* * @param userKey The AES key to use for decryption of the private key. If null then no decryption is required. diff --git a/core/src/main/java/org/bitcoinj/protocols/channels/ServerConnectionEventHandler.java b/core/src/main/java/org/bitcoinj/protocols/channels/ServerConnectionEventHandler.java index 5751c2c6..f741b609 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/ServerConnectionEventHandler.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/ServerConnectionEventHandler.java @@ -43,8 +43,8 @@ public abstract class ServerConnectionEventHandler { *

Note that this does NOT actually broadcast the most recent payment transaction, which will be triggered * automatically when the channel times out by the {@link StoredPaymentChannelServerStates}, or manually by calling * {@link StoredPaymentChannelServerStates#closeChannel(StoredServerChannel)} with the channel returned by - * {@link StoredPaymentChannelServerStates#getChannel(org.bitcoinj.core.Sha256Hash)} with the id provided in - * {@link ServerConnectionEventHandler#channelOpen(org.bitcoinj.core.Sha256Hash)}

+ * {@link StoredPaymentChannelServerStates#getChannel(Sha256Hash)} with the id provided in + * {@link ServerConnectionEventHandler#channelOpen(Sha256Hash)}

*/ @SuppressWarnings("unchecked") // The warning 'unchecked call to write(MessageType)' being suppressed here comes from the build() diff --git a/core/src/main/java/org/bitcoinj/protocols/channels/StoredServerChannel.java b/core/src/main/java/org/bitcoinj/protocols/channels/StoredServerChannel.java index b31d48e8..14f1d7c0 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/StoredServerChannel.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/StoredServerChannel.java @@ -88,7 +88,7 @@ public class StoredServerChannel { } /** - * If a handler is connected, call its {@link org.bitcoinj.protocols.channels.PaymentChannelServer#close()} + * If a handler is connected, call its {@link PaymentChannelServer#close()} * method thus disconnecting the TCP connection. */ synchronized void closeConnectedHandler() { diff --git a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java index f583f25e..e440269c 100644 --- a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java +++ b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java @@ -54,7 +54,7 @@ public class PaymentProtocol { /** * Create a payment request with one standard pay to address output. You may want to sign the request using - * {@link #signPaymentRequest}. Use {@link org.bitcoin.protocols.payments.Protos.PaymentRequest.Builder#build} to get the actual payment + * {@link #signPaymentRequest}. Use {@link Protos.PaymentRequest.Builder#build} to get the actual payment * request. * * @param params network parameters @@ -74,7 +74,7 @@ public class PaymentProtocol { /** * Create a payment request. You may want to sign the request using {@link #signPaymentRequest}. Use - * {@link org.bitcoin.protocols.payments.Protos.PaymentRequest.Builder#build} to get the actual payment request. + * {@link Protos.PaymentRequest.Builder#build} to get the actual payment request. * * @param params network parameters * @param outputs list of outputs to request coins to @@ -157,7 +157,7 @@ public class PaymentProtocol { * * @param paymentRequest Payment request to verify. * @param trustStore KeyStore of trusted root certificate authorities. - * @return verification data, or null if no PKI method was specified in the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest}. + * @return verification data, or null if no PKI method was specified in the {@link Protos.PaymentRequest}. * @throws PaymentProtocolException if payment request could not be verified. */ @Nullable diff --git a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java index 2c91b63d..5e25047a 100644 --- a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java +++ b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java @@ -48,8 +48,8 @@ import java.util.concurrent.Callable; * *
    *
  • A {@link BitcoinURI} object that conforms to BIP 0072
  • - *
  • A url where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} can be fetched
  • - *
  • Directly with a {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object
  • + *
  • A url where the {@link Protos.PaymentRequest} can be fetched
  • + *
  • Directly with a {@link Protos.PaymentRequest} object
  • *
* *

If initialized with a BitcoinURI or a url, a network request is made for the payment request object and a @@ -59,10 +59,10 @@ import java.util.concurrent.Callable; * amount and recipient are correct, perform any additional steps, and then construct a list of transactions to pass to * the sendPayment method.

* - *

Call sendPayment with a list of transactions that will be broadcast. A {@link org.bitcoin.protocols.payments.Protos.Payment} message will be sent + *

Call sendPayment with a list of transactions that will be broadcast. A {@link Protos.Payment} message will be sent * to the merchant if a payment url is provided in the PaymentRequest. NOTE: sendPayment does NOT broadcast the * transactions to the bitcoin network. Instead it returns a ListenableFuture that will be notified when a - * {@link org.bitcoin.protocols.payments.Protos.PaymentACK} is received from the merchant. Typically a wallet will show the message to the user + * {@link Protos.PaymentACK} is received from the merchant. Typically a wallet will show the message to the user * as a confirmation message that the payment is now "processing" or that an error occurred, and then broadcast the * tx itself later if needed.

* @@ -83,7 +83,7 @@ public class PaymentSession { /** *

Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. - * uri is a BIP-72-style BitcoinURI object that specifies where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may + * uri is a BIP-72-style BitcoinURI object that specifies where the {@link Protos.PaymentRequest} object may * be fetched in the r= parameter.

* *

If the payment request object specifies a PKI method, then the system trust store will be used to verify @@ -96,7 +96,7 @@ public class PaymentSession { /** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. - * uri is a BIP-72-style BitcoinURI object that specifies where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may + * uri is a BIP-72-style BitcoinURI object that specifies where the {@link Protos.PaymentRequest} object may * be fetched in the r= parameter. * If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the @@ -109,7 +109,7 @@ public class PaymentSession { /** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. - * uri is a BIP-72-style BitcoinURI object that specifies where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may + * uri is a BIP-72-style BitcoinURI object that specifies where the {@link Protos.PaymentRequest} object may * be fetched in the r= parameter. * If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the @@ -130,7 +130,7 @@ public class PaymentSession { /** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url. - * url is an address where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may be fetched. + * url is an address where the {@link Protos.PaymentRequest} object may be fetched. * If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the * signature cannot be verified. @@ -141,7 +141,7 @@ public class PaymentSession { /** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url. - * url is an address where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may be fetched. + * url is an address where the {@link Protos.PaymentRequest} object may be fetched. * If the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the * signature cannot be verified. @@ -153,7 +153,7 @@ public class PaymentSession { /** * Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url. - * url is an address where the {@link org.bitcoin.protocols.payments.Protos.PaymentRequest} object may be fetched. + * url is an address where the {@link Protos.PaymentRequest} object may be fetched. * If the payment request object specifies a PKI method, then the system trust store will * be used to verify the signature provided by the payment request. An exception is thrown by the future if the * signature cannot be verified. @@ -184,7 +184,7 @@ public class PaymentSession { } /** - * Creates a PaymentSession from the provided {@link org.bitcoin.protocols.payments.Protos.PaymentRequest}. + * Creates a PaymentSession from the provided {@link Protos.PaymentRequest}. * Verifies PKI by default. */ public PaymentSession(Protos.PaymentRequest request) throws PaymentProtocolException { @@ -192,7 +192,7 @@ public class PaymentSession { } /** - * Creates a PaymentSession from the provided {@link org.bitcoin.protocols.payments.Protos.PaymentRequest}. + * Creates a PaymentSession from the provided {@link Protos.PaymentRequest}. * If verifyPki is true, also validates the signature and throws an exception if it fails. */ public PaymentSession(Protos.PaymentRequest request, boolean verifyPki) throws PaymentProtocolException { @@ -200,7 +200,7 @@ public class PaymentSession { } /** - * Creates a PaymentSession from the provided {@link org.bitcoin.protocols.payments.Protos.PaymentRequest}. + * Creates a PaymentSession from the provided {@link Protos.PaymentRequest}. * If verifyPki is true, also validates the signature and throws an exception if it fails. * If trustStoreLoader is null, the system default trust store is used. */ diff --git a/core/src/main/java/org/bitcoinj/script/Script.java b/core/src/main/java/org/bitcoinj/script/Script.java index dc7543e6..df611167 100644 --- a/core/src/main/java/org/bitcoinj/script/Script.java +++ b/core/src/main/java/org/bitcoinj/script/Script.java @@ -736,12 +736,12 @@ public class Script { /** * Exposes the script interpreter. Normally you should not use this directly, instead use - * {@link org.bitcoinj.core.TransactionInput#verify(org.bitcoinj.core.TransactionOutput)} or - * {@link org.bitcoinj.script.Script#correctlySpends(org.bitcoinj.core.Transaction, long, Script)}. This method + * {@link TransactionInput#verify(TransactionOutput)} or + * {@link Script#correctlySpends(Transaction, long, Script)}. This method * is useful if you need more precise control or access to the final state of the stack. This interface is very * likely to change in future. * - * @deprecated Use {@link #executeScript(org.bitcoinj.core.Transaction, long, org.bitcoinj.script.Script, java.util.LinkedList, java.util.Set)} + * @deprecated Use {@link #executeScript(Transaction, long, Script, LinkedList, Set)} * instead. */ @Deprecated @@ -756,8 +756,8 @@ public class Script { /** * Exposes the script interpreter. Normally you should not use this directly, instead use - * {@link org.bitcoinj.core.TransactionInput#verify(org.bitcoinj.core.TransactionOutput)} or - * {@link org.bitcoinj.script.Script#correctlySpends(org.bitcoinj.core.Transaction, long, Script)}. This method + * {@link TransactionInput#verify(TransactionOutput)} or + * {@link Script#correctlySpends(Transaction, long, Script)}. This method * is useful if you need more precise control or access to the final state of the stack. This interface is very * likely to change in future. */ @@ -1520,7 +1520,7 @@ public class Script { * Accessing txContainingThis from another thread while this method runs results in undefined behavior. * @param scriptSigIndex The index in txContainingThis of the scriptSig (note: NOT the index of the scriptPubKey). * @param scriptPubKey The connected scriptPubKey containing the conditions needed to claim the value. - * @deprecated Use {@link #correctlySpends(org.bitcoinj.core.Transaction, long, org.bitcoinj.script.Script, java.util.Set)} + * @deprecated Use {@link #correctlySpends(Transaction, long, Script, Set)} * instead so that verification flags do not change as new verification options * are added. */ @@ -1604,7 +1604,7 @@ public class Script { } /** - * Get the {@link org.bitcoinj.script.Script.ScriptType}. + * Get the {@link Script.ScriptType}. * @return The script type, or null if the script is of unknown type */ public @Nullable ScriptType getScriptType() { diff --git a/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java b/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java index 4c5c369d..eb6dfb04 100644 --- a/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java +++ b/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java @@ -23,6 +23,7 @@ import org.bitcoinj.core.Address; import org.bitcoinj.core.LegacyAddress; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.SegwitAddress; +import org.bitcoinj.core.Transaction; import org.bitcoinj.core.Utils; import org.bitcoinj.crypto.TransactionSignature; import org.bitcoinj.script.Script.ScriptType; @@ -41,7 +42,7 @@ import static org.bitcoinj.script.ScriptOpCodes.*; /** *

Tools for the construction of commonly used script types. You don't normally need this as it's hidden behind - * convenience methods on {@link org.bitcoinj.core.Transaction}, but they are useful when working with the + * convenience methods on {@link Transaction}, but they are useful when working with the * protocol at a lower level.

*/ public class ScriptBuilder { diff --git a/core/src/main/java/org/bitcoinj/script/ScriptOpCodes.java b/core/src/main/java/org/bitcoinj/script/ScriptOpCodes.java index 3a25b24c..fcd50689 100644 --- a/core/src/main/java/org/bitcoinj/script/ScriptOpCodes.java +++ b/core/src/main/java/org/bitcoinj/script/ScriptOpCodes.java @@ -22,7 +22,7 @@ import java.util.Map; /** * Various constants that define the assembly-like scripting language that forms part of the Bitcoin protocol. - * See {@link org.bitcoinj.script.Script} for details. Also provides a method to convert them to a string. + * See {@link Script} for details. Also provides a method to convert them to a string. */ public class ScriptOpCodes { // push value diff --git a/core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java index 1bac4230..dc675862 100644 --- a/core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java @@ -34,7 +34,7 @@ import static com.google.common.base.Preconditions.checkNotNull; /** *

This signer may be used as a template for creating custom multisig transaction signers.

*

- * Concrete implementations have to implement {@link #getSignature(org.bitcoinj.core.Sha256Hash, java.util.List)} + * Concrete implementations have to implement {@link #getSignature(Sha256Hash, List)} * method returning a signature and a public key of the keypair used to created that signature. * It's up to custom implementation where to locate signatures: it may be a network connection, * some local API or something else. diff --git a/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java index f325c848..1f59b423 100644 --- a/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java @@ -31,16 +31,16 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - *

{@link TransactionSigner} implementation for signing inputs using keys from provided {@link org.bitcoinj.wallet.KeyBag}.

+ *

{@link TransactionSigner} implementation for signing inputs using keys from provided {@link KeyBag}.

*

This signer doesn't create input scripts for tx inputs. Instead it expects inputs to contain scripts with * empty sigs and replaces one of the empty sigs with calculated signature. *

*

This signer is always implicitly added into every wallet and it is the first signer to be executed during tx * completion. As the first signer to create a signature, it stores derivation path of the signing key in a given - * {@link org.bitcoinj.signers.TransactionSigner.ProposedTransaction} object that will be also passed then to the next signer in chain. This allows other + * {@link TransactionSigner.ProposedTransaction} object that will be also passed then to the next signer in chain. This allows other * signers to use correct signing key for P2SH inputs, because all the keys involved in a single P2SH address have * the same derivation path.

- *

This signer always uses {@link org.bitcoinj.core.Transaction.SigHash#ALL} signing mode.

+ *

This signer always uses {@link Transaction.SigHash#ALL} signing mode.

*/ public class LocalTransactionSigner extends StatelessTransactionSigner { private static final Logger log = LoggerFactory.getLogger(LocalTransactionSigner.class); diff --git a/core/src/main/java/org/bitcoinj/signers/MissingSigResolutionSigner.java b/core/src/main/java/org/bitcoinj/signers/MissingSigResolutionSigner.java index 41bdea73..dddba7c2 100644 --- a/core/src/main/java/org/bitcoinj/signers/MissingSigResolutionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/MissingSigResolutionSigner.java @@ -28,7 +28,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * This transaction signer resolves missing signatures in accordance with the given {@link org.bitcoinj.wallet.Wallet.MissingSigsMode}. + * This transaction signer resolves missing signatures in accordance with the given {@link Wallet.MissingSigsMode}. * If missingSigsMode is USE_OP_ZERO this signer does nothing assuming missing signatures are already presented in * scriptSigs as OP_0. * In MissingSigsMode.THROW mode this signer will throw an exception. It would be MissingSignatureException diff --git a/core/src/main/java/org/bitcoinj/signers/TransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/TransactionSigner.java index 9eccaf71..33e8dd40 100644 --- a/core/src/main/java/org/bitcoinj/signers/TransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/TransactionSigner.java @@ -20,6 +20,7 @@ import org.bitcoinj.core.Transaction; import org.bitcoinj.crypto.ChildNumber; import org.bitcoinj.script.Script; import org.bitcoinj.wallet.KeyBag; +import org.bitcoinj.wallet.Wallet; import java.util.HashMap; import java.util.List; @@ -29,7 +30,7 @@ import java.util.Map; *

Implementations of this interface are intended to sign inputs of the given transaction. Given transaction may already * be partially signed or somehow altered by other signers.

*

To make use of the signer, you need to add it into the wallet by - * calling {@link org.bitcoinj.wallet.Wallet#addTransactionSigner(TransactionSigner)}. Signer will be serialized + * calling {@link Wallet#addTransactionSigner(TransactionSigner)}. Signer will be serialized * along with the wallet data. In order for a wallet to recreate signer after deserialization, each signer * should have no-args constructor

*/ diff --git a/core/src/main/java/org/bitcoinj/signers/package-info.java b/core/src/main/java/org/bitcoinj/signers/package-info.java index f99b3deb..8c652d2c 100644 --- a/core/src/main/java/org/bitcoinj/signers/package-info.java +++ b/core/src/main/java/org/bitcoinj/signers/package-info.java @@ -19,4 +19,4 @@ * local private keys or fetching them from remote servers. The {@link org.bitcoinj.wallet.Wallet} class uses these * when sending money. */ -package org.bitcoinj.signers; \ No newline at end of file +package org.bitcoinj.signers; diff --git a/core/src/main/java/org/bitcoinj/store/BlockStore.java b/core/src/main/java/org/bitcoinj/store/BlockStore.java index 188ebb7b..26bd41b7 100644 --- a/core/src/main/java/org/bitcoinj/store/BlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/BlockStore.java @@ -16,6 +16,7 @@ package org.bitcoinj.store; +import org.bitcoinj.core.BlockChain; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.Sha256Hash; import org.bitcoinj.core.StoredBlock; @@ -46,8 +47,8 @@ public interface BlockStore { /** * Returns the {@link StoredBlock} that represents the top of the chain of greatest total work. Note that this - * can be arbitrarily expensive, you probably should use {@link org.bitcoinj.core.BlockChain#getChainHead()} - * or perhaps {@link org.bitcoinj.core.BlockChain#getBestChainHeight()} which will run in constant time and + * can be arbitrarily expensive, you probably should use {@link BlockChain#getChainHead()} + * or perhaps {@link BlockChain#getBestChainHeight()} which will run in constant time and * not take any heavyweight locks. */ StoredBlock getChainHead() throws BlockStoreException; @@ -61,7 +62,7 @@ public interface BlockStore { void close() throws BlockStoreException; /** - * Get the {@link org.bitcoinj.core.NetworkParameters} of this store. + * Get the {@link NetworkParameters} of this store. * @return The network params. */ NetworkParameters getParams(); diff --git a/core/src/main/java/org/bitcoinj/store/DatabaseFullPrunedBlockStore.java b/core/src/main/java/org/bitcoinj/store/DatabaseFullPrunedBlockStore.java index 9749dd29..e474404b 100644 --- a/core/src/main/java/org/bitcoinj/store/DatabaseFullPrunedBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/DatabaseFullPrunedBlockStore.java @@ -212,7 +212,7 @@ public abstract class DatabaseFullPrunedBlockStore implements FullPrunedBlockSto /** * Get the database specific error code that indicated a duplicate key error when inserting a record. - *

This is the code returned by {@link java.sql.SQLException#getSQLState()}

+ *

This is the code returned by {@link SQLException#getSQLState()}

* @return The database duplicate error code. */ protected abstract String getDuplicateKeyErrorCode(); @@ -546,7 +546,7 @@ public abstract class DatabaseFullPrunedBlockStore implements FullPrunedBlockSto } /** - * Create a new store for the given {@link org.bitcoinj.core.NetworkParameters}. + * Create a new store for the given {@link NetworkParameters}. * @param params The network. * @throws BlockStoreException If the store couldn't be created. */ @@ -1106,10 +1106,10 @@ public abstract class DatabaseFullPrunedBlockStore implements FullPrunedBlockSto /** * Calculate the balance for a coinbase, to-address, or p2sh address. * - *

The balance {@link org.bitcoinj.store.DatabaseFullPrunedBlockStore#getBalanceSelectSQL()} returns + *

The balance {@link DatabaseFullPrunedBlockStore#getBalanceSelectSQL()} returns * the balance (summed) as an number, then use calculateClientSide=false

* - *

The balance {@link org.bitcoinj.store.DatabaseFullPrunedBlockStore#getBalanceSelectSQL()} returns + *

The balance {@link DatabaseFullPrunedBlockStore#getBalanceSelectSQL()} returns * the all the openoutputs as stored in the DB (binary), then use calculateClientSide=true

* * @param address The address to calculate the balance of diff --git a/core/src/main/java/org/bitcoinj/store/FullPrunedBlockStore.java b/core/src/main/java/org/bitcoinj/store/FullPrunedBlockStore.java index 26624596..6c37758e 100644 --- a/core/src/main/java/org/bitcoinj/store/FullPrunedBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/FullPrunedBlockStore.java @@ -72,17 +72,17 @@ public interface FullPrunedBlockStore extends BlockStore, UTXOProvider { StoredUndoableBlock getUndoBlock(Sha256Hash hash) throws BlockStoreException; /** - * Gets a {@link org.bitcoinj.core.UTXO} with the given hash and index, or null if none is found + * Gets a {@link UTXO} with the given hash and index, or null if none is found */ UTXO getTransactionOutput(Sha256Hash hash, long index) throws BlockStoreException; /** - * Adds a {@link org.bitcoinj.core.UTXO} to the list of unspent TransactionOutputs + * Adds a {@link UTXO} to the list of unspent TransactionOutputs */ void addUnspentTransactionOutput(UTXO out) throws BlockStoreException; /** - * Removes a {@link org.bitcoinj.core.UTXO} from the list of unspent TransactionOutputs + * Removes a {@link UTXO} from the list of unspent TransactionOutputs * Note that the coinbase of the genesis block should NEVER be spendable and thus never in the list. * @throws BlockStoreException if there is an underlying storage issue, or out was not in the list. */ diff --git a/core/src/main/java/org/bitcoinj/store/MemoryBlockStore.java b/core/src/main/java/org/bitcoinj/store/MemoryBlockStore.java index eb2be66e..f4cc6217 100644 --- a/core/src/main/java/org/bitcoinj/store/MemoryBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/MemoryBlockStore.java @@ -22,7 +22,7 @@ import java.util.LinkedHashMap; import java.util.Map; /** - * Keeps {@link org.bitcoinj.core.StoredBlock}s in memory. Used primarily for unit testing. + * Keeps {@link StoredBlock}s in memory. Used primarily for unit testing. */ public class MemoryBlockStore implements BlockStore { private LinkedHashMap blockMap = new LinkedHashMap() { diff --git a/core/src/main/java/org/bitcoinj/store/MemoryFullPrunedBlockStore.java b/core/src/main/java/org/bitcoinj/store/MemoryFullPrunedBlockStore.java index f5c35799..6fb16db4 100644 --- a/core/src/main/java/org/bitcoinj/store/MemoryFullPrunedBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/MemoryFullPrunedBlockStore.java @@ -229,7 +229,7 @@ class TransactionalMultiKeyHashMap { } /** - * Keeps {@link StoredBlock}s, {@link StoredUndoableBlock}s and {@link org.bitcoinj.core.UTXO}s in memory. + * Keeps {@link StoredBlock}s, {@link StoredUndoableBlock}s and {@link UTXO}s in memory. * Used primarily for unit testing. */ public class MemoryFullPrunedBlockStore implements FullPrunedBlockStore { diff --git a/core/src/main/java/org/bitcoinj/store/MySQLFullPrunedBlockStore.java b/core/src/main/java/org/bitcoinj/store/MySQLFullPrunedBlockStore.java index ca5d454f..a79729c2 100644 --- a/core/src/main/java/org/bitcoinj/store/MySQLFullPrunedBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/MySQLFullPrunedBlockStore.java @@ -16,6 +16,7 @@ package org.bitcoinj.store; +import org.bitcoinj.core.Address; import org.bitcoinj.core.NetworkParameters; import java.util.ArrayList; @@ -24,7 +25,7 @@ import java.util.List; /** *

A full pruned block store using the MySQL database engine. As an added bonus an address index is calculated, - * so you can use {@link #calculateBalanceForAddress(org.bitcoinj.core.Address)} to quickly look up + * so you can use {@link #calculateBalanceForAddress(Address)} to quickly look up * the quantity of bitcoins controlled by that address.

*/ public class MySQLFullPrunedBlockStore extends DatabaseFullPrunedBlockStore { diff --git a/core/src/main/java/org/bitcoinj/store/PostgresFullPrunedBlockStore.java b/core/src/main/java/org/bitcoinj/store/PostgresFullPrunedBlockStore.java index 87a895d0..60d48d00 100644 --- a/core/src/main/java/org/bitcoinj/store/PostgresFullPrunedBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/PostgresFullPrunedBlockStore.java @@ -34,7 +34,7 @@ import java.util.List; /** *

A full pruned block store using the Postgres database engine. As an added bonus an address index is calculated, - * so you can use {@link #calculateBalanceForAddress(org.bitcoinj.core.Address)} to quickly look up + * so you can use {@link #calculateBalanceForAddress(Address)} to quickly look up * the quantity of bitcoins controlled by that address.

*/ public class PostgresFullPrunedBlockStore extends DatabaseFullPrunedBlockStore { diff --git a/core/src/main/java/org/bitcoinj/uri/BitcoinURI.java b/core/src/main/java/org/bitcoinj/uri/BitcoinURI.java index 4f8de541..7b403dea 100644 --- a/core/src/main/java/org/bitcoinj/uri/BitcoinURI.java +++ b/core/src/main/java/org/bitcoinj/uri/BitcoinURI.java @@ -85,8 +85,8 @@ public class BitcoinURI { public static final String FIELD_PAYMENT_REQUEST_URL = "r"; /** - * URI for Bitcoin network. Use {@link org.bitcoinj.params.AbstractBitcoinNetParams#BITCOIN_SCHEME} if you specifically - * need Bitcoin, or use {@link org.bitcoinj.core.NetworkParameters#getUriScheme} to get the scheme + * URI for Bitcoin network. Use {@link AbstractBitcoinNetParams#BITCOIN_SCHEME} if you specifically + * need Bitcoin, or use {@link NetworkParameters#getUriScheme} to get the scheme * from network parameters. */ @Deprecated diff --git a/core/src/main/java/org/bitcoinj/uri/OptionalFieldValidationException.java b/core/src/main/java/org/bitcoinj/uri/OptionalFieldValidationException.java index e9986e0b..655b87bf 100644 --- a/core/src/main/java/org/bitcoinj/uri/OptionalFieldValidationException.java +++ b/core/src/main/java/org/bitcoinj/uri/OptionalFieldValidationException.java @@ -17,7 +17,7 @@ package org.bitcoinj.uri; /** - *

Exception to provide the following to {@link org.bitcoinj.uri.BitcoinURI}:

+ *

Exception to provide the following to {@link BitcoinURI}:

*
    *
  • Provision of parsing error messages
  • *
diff --git a/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java index 3473562a..30472afe 100644 --- a/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java @@ -19,8 +19,11 @@ package org.bitcoinj.utils; import static org.bitcoinj.core.Coin.SMALLEST_UNIT_EXPONENT; import static com.google.common.base.Preconditions.checkArgument; import com.google.common.base.Objects; +import org.bitcoinj.core.Coin; + import java.math.BigInteger; import java.text.DecimalFormat; +import java.text.Format; import java.text.NumberFormat; import java.util.Locale; import java.util.List; @@ -38,12 +41,12 @@ import java.util.List; * *

A more detailed explanation, including examples, is in the documentation for the * {@link BtcFormat} class, and further information beyond that is in the documentation for the - * {@link java.text.Format} class, from which this class descends.

+ * {@link Format} class, from which this class descends.

- * @see java.text.Format - * @see java.text.NumberFormat - * @see java.text.DecimalFormat - * @see org.bitcoinj.core.Coin + * @see Format + * @see NumberFormat + * @see DecimalFormat + * @see Coin */ public final class BtcFixedFormat extends BtcFormat { diff --git a/core/src/main/java/org/bitcoinj/utils/BtcFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java index a49c530d..95a7777a 100644 --- a/core/src/main/java/org/bitcoinj/utils/BtcFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java @@ -267,10 +267,10 @@ import java.util.regex.Pattern; *

Formatting

* *

You format a Bitcoin monetary value by passing it to the {@link BtcFormat#format(Object)} - * method. This argument can be either a {@link org.bitcoinj.core.Coin}-type object or a - * numerical object such as {@link java.lang.Long} or {@link java.math.BigDecimal}. - * Integer-based types such as {@link java.math.BigInteger} are interpreted as representing a - * number of satoshis, while a {@link java.math.BigDecimal} is interpreted as representing a + * method. This argument can be either a {@link Coin}-type object or a + * numerical object such as {@link Long} or {@link BigDecimal}. + * Integer-based types such as {@link BigInteger} are interpreted as representing a + * number of satoshis, while a {@link BigDecimal} is interpreted as representing a * number of bitcoins. A value having a fractional amount of satoshis is rounded to the * nearest whole satoshi at least, and possibly to a greater unit depending on the number of * fractional decimal-places displayed. The {@code format()} method will not accept an @@ -322,9 +322,9 @@ import java.util.regex.Pattern; *

When using an automatically-denominating formatter, you might * want to know what denomination was chosen. You can get the * currency-units indicator, as well as any other field in the - * formatted output, by using a {@link java.text.FieldPosition} instance + * formatted output, by using a {@link FieldPosition} instance * constructed using an appropriate constant from the {@link - * java.text.NumberFormat.Field} class:

+ * NumberFormat.Field} class:

* *
  * BtcFormat de = BtcFormat.getInstance(Locale.GERMANY);
@@ -393,7 +393,7 @@ import java.util.regex.Pattern;
  * 
* *

If you need to vertically-align columns printed in a proportional font, - * then see the documentation for the {@link java.text.NumberFormat} class + * then see the documentation for the {@link NumberFormat} class * for an explanation of how to do that.

* *

Parsing

@@ -447,7 +447,7 @@ import java.util.regex.Pattern; * *

Parsing

* - *

Parsing is performed by an underlying {@link java.text.NumberFormat} object. While this + *

Parsing is performed by an underlying {@link NumberFormat} object. While this * delivers the benefit of recognizing locale-specific patterns, some have criticized other * aspects of its behavior. For example, see this article by Joe Sam @@ -465,12 +465,12 @@ import java.util.regex.Pattern; * *

Instances of this class are immutable.

* - * @see java.text.Format - * @see java.text.NumberFormat - * @see java.text.DecimalFormat - * @see java.text.DecimalFormatSymbols - * @see java.text.FieldPosition - * @see org.bitcoinj.core.Coin + * @see Format + * @see NumberFormat + * @see DecimalFormat + * @see DecimalFormatSymbols + * @see FieldPosition + * @see Coin */ public abstract class BtcFormat extends Format { @@ -635,7 +635,7 @@ public abstract class BtcFormat extends Format { * if that method is not invoked. */ public Builder fractionGroups(int... val) { fractionGroups = val; return this; } - /** Specify the {@link java.util.Locale} for formatting and parsing. + /** Specify the {@link Locale} for formatting and parsing. * If this method is not invoked, then the runtime default locale will be used. */ public Builder locale(Locale val) { locale = val; return this; } @@ -660,7 +660,7 @@ public abstract class BtcFormat extends Format { public Builder code(String val) { code = val; return this; } /** Use the given pattern when formatting and parsing. The format of this pattern is - * identical to that used by the {@link java.text.DecimalFormat} class. + * identical to that used by the {@link DecimalFormat} class. * *

If the pattern lacks a negative subpattern, then the formatter will indicate * negative values by placing a minus sign immediately preceding the number part of @@ -687,7 +687,7 @@ public abstract class BtcFormat extends Format { } /** Use the given localized-pattern for formatting and parsing. The format of this - * pattern is identical to the patterns used by the {@link java.text.DecimalFormat} + * pattern is identical to the patterns used by the {@link DecimalFormat} * class. * *

The pattern is localized according to the locale of the {@code BtcFormat} @@ -1116,12 +1116,12 @@ public abstract class BtcFormat extends Format { // ****** FORMATTING ***** /** - * Formats a bitcoin monetary value and returns an {@link java.text.AttributedCharacterIterator}. + * Formats a bitcoin monetary value and returns an {@link AttributedCharacterIterator}. * By iterating, you can examine what fields apply to each character. This can be useful * since a character may be part of more than one field, for example a grouping separator * that is also part of the integer field. * - * @see java.text.AttributedCharacterIterator + * @see AttributedCharacterIterator */ @Override public AttributedCharacterIterator formatToCharacterIterator(Object obj) { synchronized(numberFormat) { @@ -1303,8 +1303,8 @@ public abstract class BtcFormat extends Format { /** * Parse a {@link String} representation of a Bitcoin monetary value. Returns a - * {@link org.bitcoinj.core.Coin} object that represents the parsed value. - * @see java.text.NumberFormat */ + * {@link Coin} object that represents the parsed value. + * @see NumberFormat */ @Override public final Object parseObject(String source, ParsePosition pos) { return parse(source, pos); } @@ -1501,7 +1501,7 @@ public abstract class BtcFormat extends Format { * *

This method accommodates an imperfection in the Java formatting code and distributed * locale data. To wit: the subpattern for negative numbers is optional and not all - * locales have one. In those cases, {@link java.text.DecimalFormat} will indicate numbers + * locales have one. In those cases, {@link DecimalFormat} will indicate numbers * less than zero by adding a negative sign as the first character of the prefix of the * positive subpattern. * @@ -1521,7 +1521,7 @@ public abstract class BtcFormat extends Format { /** * Return an array of all locales for which the getInstance() method of this class can - * return localized instances. See {@link java.text.NumberFormat#getAvailableLocales()} + * return localized instances. See {@link NumberFormat#getAvailableLocales()} */ public static Locale[] getAvailableLocales() { return NumberFormat.getAvailableLocales(); } diff --git a/core/src/main/java/org/bitcoinj/utils/ContextPropagatingThreadFactory.java b/core/src/main/java/org/bitcoinj/utils/ContextPropagatingThreadFactory.java index b4156216..ba8f4b2b 100644 --- a/core/src/main/java/org/bitcoinj/utils/ContextPropagatingThreadFactory.java +++ b/core/src/main/java/org/bitcoinj/utils/ContextPropagatingThreadFactory.java @@ -23,7 +23,7 @@ import org.slf4j.*; import java.util.concurrent.*; /** - * A {@link java.util.concurrent.ThreadFactory} that propagates a {@link org.bitcoinj.core.Context} from the creating + * A {@link ThreadFactory} that propagates a {@link Context} from the creating * thread into the new thread. This factory creates daemon threads. */ public class ContextPropagatingThreadFactory implements ThreadFactory { diff --git a/core/src/main/java/org/bitcoinj/utils/Fiat.java b/core/src/main/java/org/bitcoinj/utils/Fiat.java index 434a7592..977f03c9 100644 --- a/core/src/main/java/org/bitcoinj/utils/Fiat.java +++ b/core/src/main/java/org/bitcoinj/utils/Fiat.java @@ -21,13 +21,14 @@ import static com.google.common.base.Preconditions.checkArgument; import java.io.Serializable; import java.math.BigDecimal; +import org.bitcoinj.core.Coin; import org.bitcoinj.core.Monetary; import com.google.common.base.Objects; import com.google.common.math.LongMath; import com.google.common.primitives.Longs; /** - * Represents a monetary fiat value. It was decided to not fold this into {@link org.bitcoinj.core.Coin} because of type + * Represents a monetary fiat value. It was decided to not fold this into {@link Coin} because of type * safety. Fiat values always come with an attached currency code. * * This class is immutable. diff --git a/core/src/main/java/org/bitcoinj/utils/MonetaryFormat.java b/core/src/main/java/org/bitcoinj/utils/MonetaryFormat.java index 122eca19..dc5e9b4b 100644 --- a/core/src/main/java/org/bitcoinj/utils/MonetaryFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/MonetaryFormat.java @@ -393,7 +393,7 @@ public final class MonetaryFormat { } /** - * Parse a human readable coin value to a {@link org.bitcoinj.core.Coin} instance. + * Parse a human readable coin value to a {@link Coin} instance. * * @throws NumberFormatException * if the string cannot be parsed for some reason @@ -403,7 +403,7 @@ public final class MonetaryFormat { } /** - * Parse a human readable fiat value to a {@link org.bitcoinj.utils.Fiat} instance. + * Parse a human readable fiat value to a {@link Fiat} instance. * * @throws NumberFormatException * if the string cannot be parsed for some reason diff --git a/core/src/main/java/org/bitcoinj/utils/TaggableObject.java b/core/src/main/java/org/bitcoinj/utils/TaggableObject.java index c6d64340..561a5165 100644 --- a/core/src/main/java/org/bitcoinj/utils/TaggableObject.java +++ b/core/src/main/java/org/bitcoinj/utils/TaggableObject.java @@ -39,7 +39,7 @@ public interface TaggableObject { @Nullable ByteString maybeGetTag(String tag); /** - * Returns the immutable byte array associated with the given tag name, or throws {@link java.lang.IllegalArgumentException} + * Returns the immutable byte array associated with the given tag name, or throws {@link IllegalArgumentException} * if that tag wasn't set yet. */ ByteString getTag(String tag); diff --git a/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java b/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java index 00690a9c..a7b98923 100644 --- a/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java @@ -434,7 +434,7 @@ public class BasicKeyChain implements EncryptableKeyChain { /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * Convenience wrapper around {@link #toEncrypted(org.bitcoinj.crypto.KeyCrypter, + * Convenience wrapper around {@link #toEncrypted(KeyCrypter, * org.spongycastle.crypto.params.KeyParameter)} which uses the default Scrypt key derivation algorithm and * parameters, derives a key from the given password and returns the created key. */ @@ -449,7 +449,7 @@ public class BasicKeyChain implements EncryptableKeyChain { /** * Encrypt the wallet using the KeyCrypter and the AES key. A good default KeyCrypter to use is - * {@link org.bitcoinj.crypto.KeyCrypterScrypt}. + * {@link KeyCrypterScrypt}. * * @param keyCrypter The KeyCrypter that specifies how to encrypt/ decrypt a key * @param aesKey AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming diff --git a/core/src/main/java/org/bitcoinj/wallet/CoinSelection.java b/core/src/main/java/org/bitcoinj/wallet/CoinSelection.java index 4c8cd7de..4b33704d 100644 --- a/core/src/main/java/org/bitcoinj/wallet/CoinSelection.java +++ b/core/src/main/java/org/bitcoinj/wallet/CoinSelection.java @@ -20,10 +20,11 @@ import org.bitcoinj.core.Coin; import org.bitcoinj.core.TransactionOutput; import java.util.Collection; +import java.util.List; /** * Represents the results of a - * {@link CoinSelector#select(Coin, java.util.List)} operation. A + * {@link CoinSelector#select(Coin, List)} operation. A * coin selection represents a list of spendable transaction outputs that sum together to give valueGathered. * Different coin selections could be produced by different coin selectors from the same input set, according * to their varying policies. diff --git a/core/src/main/java/org/bitcoinj/wallet/DecryptingKeyBag.java b/core/src/main/java/org/bitcoinj/wallet/DecryptingKeyBag.java index d997f031..f8305cf8 100644 --- a/core/src/main/java/org/bitcoinj/wallet/DecryptingKeyBag.java +++ b/core/src/main/java/org/bitcoinj/wallet/DecryptingKeyBag.java @@ -28,7 +28,7 @@ import static com.google.common.base.Preconditions.checkNotNull; /** * A DecryptingKeyBag filters a pre-existing key bag, decrypting keys as they are requested using the provided - * AES key. If the keys are encrypted and no AES key provided, {@link org.bitcoinj.core.ECKey.KeyIsEncryptedException} + * AES key. If the keys are encrypted and no AES key provided, {@link ECKey.KeyIsEncryptedException} * will be thrown. */ public class DecryptingKeyBag implements KeyBag { diff --git a/core/src/main/java/org/bitcoinj/wallet/DefaultRiskAnalysis.java b/core/src/main/java/org/bitcoinj/wallet/DefaultRiskAnalysis.java index 7f1427cc..9795bc03 100644 --- a/core/src/main/java/org/bitcoinj/wallet/DefaultRiskAnalysis.java +++ b/core/src/main/java/org/bitcoinj/wallet/DefaultRiskAnalysis.java @@ -121,7 +121,7 @@ public class DefaultRiskAnalysis implements RiskAnalysis { /** * The reason a transaction is considered non-standard, returned by - * {@link #isStandard(org.bitcoinj.core.Transaction)}. + * {@link #isStandard(Transaction)}. */ public enum RuleViolation { NONE, diff --git a/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java b/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java index 16c17545..2438c91f 100644 --- a/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java @@ -48,10 +48,10 @@ import static com.google.common.collect.Lists.newLinkedList; /** *

A deterministic key chain is a {@link KeyChain} that uses the * BIP 32 standard, as implemented by - * {@link org.bitcoinj.crypto.DeterministicHierarchy}, to derive all the keys in the keychain from a master seed. + * {@link DeterministicHierarchy}, to derive all the keys in the keychain from a master seed. * This type of wallet is extremely convenient and flexible. Although backing up full wallet files is always a good * idea, to recover money only the root seed needs to be preserved and that is a number small enough that it can be - * written down on paper or, when represented using a BIP 39 {@link org.bitcoinj.crypto.MnemonicCode}, + * written down on paper or, when represented using a BIP 39 {@link MnemonicCode}, * dictated over the phone (possibly even memorized).

* *

Deterministic key chains have other advantages: parts of the key tree can be selectively revealed to allow @@ -61,14 +61,14 @@ import static com.google.common.collect.Lists.newLinkedList; * A watching wallet is not instantiated using the public part of the master key as you may imagine. Instead, you * need to take the account key (first child of the master key) and provide the public part of that to the watching * wallet instead. You can do this by calling {@link #getWatchingKey()} and then serializing it with - * {@link org.bitcoinj.crypto.DeterministicKey#serializePubB58(org.bitcoinj.core.NetworkParameters)}. The resulting "xpub..." string encodes + * {@link DeterministicKey#serializePubB58(NetworkParameters)}. The resulting "xpub..." string encodes * sufficient information about the account key to create a watching chain via - * {@link org.bitcoinj.crypto.DeterministicKey#deserializeB58(org.bitcoinj.crypto.DeterministicKey, String, org.bitcoinj.core.NetworkParameters)} + * {@link DeterministicKey#deserializeB58(DeterministicKey, String, NetworkParameters)} * (with null as the first parameter) and then - * {@link DeterministicKeyChain#DeterministicKeyChain(org.bitcoinj.crypto.DeterministicKey)}.

+ * {@link DeterministicKeyChain#DeterministicKeyChain(DeterministicKey)}.

* - *

This class builds on {@link org.bitcoinj.crypto.DeterministicHierarchy} and - * {@link org.bitcoinj.crypto.DeterministicKey} by adding support for serialization to and from protobufs, + *

This class builds on {@link DeterministicHierarchy} and + * {@link DeterministicKey} by adding support for serialization to and from protobufs, * and encryption of parts of the key tree. Internally it arranges itself as per the BIP 32 spec, with the seed being * used to derive a master key, which is then used to derive an account key, the account key is used to derive two * child keys called the internal and external parent keys (for change and handing out addresses respectively) @@ -197,7 +197,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain { } /** - * Generates a new key chain with entropy selected randomly from the given {@link java.security.SecureRandom} + * Generates a new key chain with entropy selected randomly from the given {@link SecureRandom} * object and of the requested size in bits. The derived seed is further protected with a user selected passphrase * (see BIP 39). * @param random the random number generator - use new SecureRandom(). @@ -210,7 +210,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain { } /** - * Generates a new key chain with 128 bits of entropy selected randomly from the given {@link java.security.SecureRandom} + * Generates a new key chain with 128 bits of entropy selected randomly from the given {@link SecureRandom} * object. The derived seed is further protected with a user selected passphrase * (see BIP 39). * @param random the random number generator - use new SecureRandom(). @@ -268,7 +268,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain { } /** - * Generates a new key chain with entropy selected randomly from the given {@link java.security.SecureRandom} + * Generates a new key chain with entropy selected randomly from the given {@link SecureRandom} * object and the default entropy size. */ public DeterministicKeyChain(SecureRandom random) { @@ -276,7 +276,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain { } /** - * Generates a new key chain with entropy selected randomly from the given {@link java.security.SecureRandom} + * Generates a new key chain with entropy selected randomly from the given {@link SecureRandom} * object and of the requested size in bits. */ public DeterministicKeyChain(SecureRandom random, int bits) { @@ -284,7 +284,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain { } /** - * Generates a new key chain with entropy selected randomly from the given {@link java.security.SecureRandom} + * Generates a new key chain with entropy selected randomly from the given {@link SecureRandom} * object and of the requested size in bits. The derived seed is further protected with a user selected passphrase * (see BIP 39). */ @@ -399,7 +399,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain { /** * Creates a deterministic key chain with an encrypted deterministic seed using the provided account path. - * Using {@link org.bitcoinj.crypto.KeyCrypter KeyCrypter} to decrypt. + * Using {@link KeyCrypter KeyCrypter} to decrypt. */ protected DeterministicKeyChain(DeterministicSeed seed, @Nullable KeyCrypter crypter, ImmutableList accountPath) { @@ -673,7 +673,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain { *

An alias for {@code getKeyByPath(getAccountPath())}.

* *

Use this when you would like to create a watching key chain that follows this one, but can't spend money from it. - * The returned key can be serialized and then passed into {@link #watch(org.bitcoinj.crypto.DeterministicKey)} + * The returned key can be serialized and then passed into {@link #watch(DeterministicKey)} * on another system to watch the hierarchy.

* *

Note that the returned key is not pubkey only unless this key chain already is: the returned key can still diff --git a/core/src/main/java/org/bitcoinj/wallet/DeterministicSeed.java b/core/src/main/java/org/bitcoinj/wallet/DeterministicSeed.java index bbb4d559..a2a55175 100644 --- a/core/src/main/java/org/bitcoinj/wallet/DeterministicSeed.java +++ b/core/src/main/java/org/bitcoinj/wallet/DeterministicSeed.java @@ -71,7 +71,7 @@ public class DeterministicSeed implements EncryptableItem { } /** - * Constructs a seed from a BIP 39 mnemonic code. See {@link org.bitcoinj.crypto.MnemonicCode} for more + * Constructs a seed from a BIP 39 mnemonic code. See {@link MnemonicCode} for more * details on this scheme. * @param mnemonicCode A list of words. * @param seed The derived seed, or pass null to derive it from mnemonicCode (slow) @@ -83,7 +83,7 @@ public class DeterministicSeed implements EncryptableItem { } /** - * Constructs a seed from a BIP 39 mnemonic code. See {@link org.bitcoinj.crypto.MnemonicCode} for more + * Constructs a seed from a BIP 39 mnemonic code. See {@link MnemonicCode} for more * details on this scheme. * @param random Entropy source * @param bits number of bits, must be divisible by 32 @@ -95,7 +95,7 @@ public class DeterministicSeed implements EncryptableItem { } /** - * Constructs a seed from a BIP 39 mnemonic code. See {@link org.bitcoinj.crypto.MnemonicCode} for more + * Constructs a seed from a BIP 39 mnemonic code. See {@link MnemonicCode} for more * details on this scheme. * @param entropy entropy bits, length must be divisible by 32 * @param passphrase A user supplied passphrase, or an empty string if there is no passphrase diff --git a/core/src/main/java/org/bitcoinj/wallet/EncryptableKeyChain.java b/core/src/main/java/org/bitcoinj/wallet/EncryptableKeyChain.java index 4ad8e117..b35cf6bf 100644 --- a/core/src/main/java/org/bitcoinj/wallet/EncryptableKeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/EncryptableKeyChain.java @@ -18,6 +18,7 @@ package org.bitcoinj.wallet; import org.bitcoinj.crypto.KeyCrypter; import org.bitcoinj.crypto.KeyCrypterException; +import org.bitcoinj.crypto.KeyCrypterScrypt; import org.spongycastle.crypto.params.KeyParameter; import javax.annotation.Nullable; @@ -28,8 +29,8 @@ import javax.annotation.Nullable; public interface EncryptableKeyChain extends KeyChain { /** * Takes the given password, which should be strong, derives a key from it and then invokes - * {@link #toEncrypted(org.bitcoinj.crypto.KeyCrypter, org.spongycastle.crypto.params.KeyParameter)} with - * {@link org.bitcoinj.crypto.KeyCrypterScrypt} as the crypter. + * {@link #toEncrypted(KeyCrypter, KeyParameter)} with + * {@link KeyCrypterScrypt} as the crypter. * * @return The derived key, in case you wish to cache it for future use. */ @@ -42,7 +43,7 @@ public interface EncryptableKeyChain extends KeyChain { EncryptableKeyChain toEncrypted(KeyCrypter keyCrypter, KeyParameter aesKey); /** - * Decrypts the key chain with the given password. See {@link #toDecrypted(org.spongycastle.crypto.params.KeyParameter)} + * Decrypts the key chain with the given password. See {@link #toDecrypted(KeyParameter)} * for details. */ EncryptableKeyChain toDecrypted(CharSequence password); @@ -50,7 +51,7 @@ public interface EncryptableKeyChain extends KeyChain { /** * Decrypt the key chain with the given AES key and whatever {@link KeyCrypter} is already set. Note that if you * just want to spend money from an encrypted wallet, don't decrypt the whole thing first. Instead, set the - * {@link org.bitcoinj.wallet.SendRequest#aesKey} field before asking the wallet to build the send. + * {@link SendRequest#aesKey} field before asking the wallet to build the send. * * @param aesKey AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming to * create from a password) diff --git a/core/src/main/java/org/bitcoinj/wallet/KeyChain.java b/core/src/main/java/org/bitcoinj/wallet/KeyChain.java index 3d2dcc60..aa1ba9e5 100644 --- a/core/src/main/java/org/bitcoinj/wallet/KeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyChain.java @@ -24,7 +24,7 @@ import java.util.List; import java.util.concurrent.Executor; /** - *

A KeyChain is a class that stores a collection of keys for a {@link org.bitcoinj.wallet.Wallet}. Key chains + *

A KeyChain is a class that stores a collection of keys for a {@link Wallet}. Key chains * are expected to be able to look up keys given a hash (i.e. address) or pubkey bytes, and provide keys on request * for a given purpose. They can inform event listeners about new keys being added.

* @@ -88,7 +88,7 @@ public interface KeyChain { *

This is used to generate a {@link BloomFilter} which can be {@link BloomFilter#merge(BloomFilter)}d with * another. It could also be used if you have a specific target for the filter's size.

* - *

See the docs for {@link org.bitcoinj.core.BloomFilter#BloomFilter(int, double, long)} for a brief + *

See the docs for {@link BloomFilter#BloomFilter(int, double, long)} for a brief * explanation of anonymity when using bloom filters, and for the meaning of these parameters.

*/ BloomFilter getFilter(int size, double falsePositiveRate, long tweak); diff --git a/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java b/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java index e707650d..1898a323 100644 --- a/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java @@ -42,7 +42,7 @@ import java.util.concurrent.*; import static com.google.common.base.Preconditions.*; /** - *

A KeyChainGroup is used by the {@link org.bitcoinj.wallet.Wallet} and + *

A KeyChainGroup is used by the {@link Wallet} and * manages: a {@link BasicKeyChain} object (which will normally be empty), and zero or more * {@link DeterministicKeyChain}s. A deterministic key chain will be created lazily/on demand * when a fresh or current key is requested, possibly being initialized from the private key bytes of the earliest non @@ -504,7 +504,7 @@ public class KeyChainGroup implements KeyBag { /** * Encrypt the keys in the group using the KeyCrypter and the AES key. A good default KeyCrypter to use is - * {@link org.bitcoinj.crypto.KeyCrypterScrypt}. + * {@link KeyCrypterScrypt}. * * @throws org.bitcoinj.crypto.KeyCrypterException Thrown if the wallet encryption fails for some reason, * leaving the group unchanged. @@ -531,7 +531,7 @@ public class KeyChainGroup implements KeyBag { /** * Decrypt the keys in the group using the previously given key crypter and the AES key. A good default - * KeyCrypter to use is {@link org.bitcoinj.crypto.KeyCrypterScrypt}. + * KeyCrypter to use is {@link KeyCrypterScrypt}. * * @throws org.bitcoinj.crypto.KeyCrypterException Thrown if the wallet decryption fails for some reason, leaving the group unchanged. */ diff --git a/core/src/main/java/org/bitcoinj/wallet/KeyTimeCoinSelector.java b/core/src/main/java/org/bitcoinj/wallet/KeyTimeCoinSelector.java index 424ddcaf..332ba495 100644 --- a/core/src/main/java/org/bitcoinj/wallet/KeyTimeCoinSelector.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyTimeCoinSelector.java @@ -37,7 +37,7 @@ import static com.google.common.base.Preconditions.checkNotNull; public class KeyTimeCoinSelector implements CoinSelector { private static final Logger log = LoggerFactory.getLogger(KeyTimeCoinSelector.class); - /** A number of inputs chosen to avoid hitting {@link org.bitcoinj.core.Transaction#MAX_STANDARD_TX_SIZE} */ + /** A number of inputs chosen to avoid hitting {@link Transaction#MAX_STANDARD_TX_SIZE} */ public static final int MAX_SIMULTANEOUS_INPUTS = 600; private final long unixTimeSeconds; diff --git a/core/src/main/java/org/bitcoinj/wallet/SendRequest.java b/core/src/main/java/org/bitcoinj/wallet/SendRequest.java index bf7f0bdf..58bf93f5 100644 --- a/core/src/main/java/org/bitcoinj/wallet/SendRequest.java +++ b/core/src/main/java/org/bitcoinj/wallet/SendRequest.java @@ -66,7 +66,7 @@ public class SendRequest { /** * When emptyWallet is set, all coins selected by the coin selector are sent to the first output in tx - * (its value is ignored and set to {@link org.bitcoinj.wallet.Wallet#getBalance()} - the fees required + * (its value is ignored and set to {@link Wallet#getBalance()} - the fees required * for the transaction). Any additional outputs are removed. */ public boolean emptyWallet = false; @@ -116,7 +116,7 @@ public class SendRequest { public KeyParameter aesKey = null; /** - * If not null, the {@link org.bitcoinj.wallet.CoinSelector} to use instead of the wallets default. Coin selectors are + * If not null, the {@link CoinSelector} to use instead of the wallets default. Coin selectors are * responsible for choosing which transaction outputs (coins) in a wallet to use given the desired send value * amount. */ diff --git a/core/src/main/java/org/bitcoinj/wallet/Wallet.java b/core/src/main/java/org/bitcoinj/wallet/Wallet.java index e2bb7e7f..49eb2a24 100644 --- a/core/src/main/java/org/bitcoinj/wallet/Wallet.java +++ b/core/src/main/java/org/bitcoinj/wallet/Wallet.java @@ -116,7 +116,7 @@ import static com.google.common.base.Preconditions.*; * auto-save feature that simplifies this for you although you're still responsible for manually triggering a save when * your app is about to quit because the auto-save feature waits a moment before actually committing to disk to avoid IO * thrashing when the wallet is changing very fast (eg due to a block chain sync). See - * {@link Wallet#autosaveToFile(java.io.File, long, java.util.concurrent.TimeUnit, org.bitcoinj.wallet.WalletFiles.Listener)} + * {@link Wallet#autosaveToFile(File, long, TimeUnit, WalletFiles.Listener)} * for more information about this.

*/ public class Wallet extends BaseTaggableObject @@ -268,7 +268,7 @@ public class Wallet extends BaseTaggableObject * @param params network parameters * @param seed deterministic seed * @return a wallet from a deterministic seed with a - * {@link org.bitcoinj.wallet.DeterministicKeyChain#ACCOUNT_ZERO_PATH 0 hardened path} + * {@link DeterministicKeyChain#ACCOUNT_ZERO_PATH 0 hardened path} */ public static Wallet fromSeed(NetworkParameters params, DeterministicSeed seed) { return new Wallet(params, new KeyChainGroup(params, seed)); @@ -444,7 +444,7 @@ public class Wallet extends BaseTaggableObject /** * Returns a key that hasn't been seen in a transaction yet, and which is suitable for displaying in a wallet * user interface as "a convenient key to receive funds on" when the purpose parameter is - * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS}. The returned key is stable until + * {@link KeyChain.KeyPurpose#RECEIVE_FUNDS}. The returned key is stable until * it's actually seen in a pending or confirmed transaction, at which point this method will start returning * a different key (for each purpose independently). */ @@ -459,15 +459,15 @@ public class Wallet extends BaseTaggableObject } /** - * An alias for calling {@link #currentKey(org.bitcoinj.wallet.KeyChain.KeyPurpose)} with - * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. + * An alias for calling {@link #currentKey(KeyChain.KeyPurpose)} with + * {@link KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. */ public DeterministicKey currentReceiveKey() { return currentKey(KeyChain.KeyPurpose.RECEIVE_FUNDS); } /** - * Returns address for a {@link #currentKey(org.bitcoinj.wallet.KeyChain.KeyPurpose)} + * Returns address for a {@link #currentKey(KeyChain.KeyPurpose)} */ public Address currentAddress(KeyChain.KeyPurpose purpose) { keyChainGroupLock.lock(); @@ -480,8 +480,8 @@ public class Wallet extends BaseTaggableObject } /** - * An alias for calling {@link #currentAddress(org.bitcoinj.wallet.KeyChain.KeyPurpose)} with - * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. + * An alias for calling {@link #currentAddress(KeyChain.KeyPurpose)} with + * {@link KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. */ public Address currentReceiveAddress() { return currentAddress(KeyChain.KeyPurpose.RECEIVE_FUNDS); @@ -490,8 +490,8 @@ public class Wallet extends BaseTaggableObject /** * Returns a key that has not been returned by this method before (fresh). You can think of this as being * a newly created key, although the notion of "create" is not really valid for a - * {@link org.bitcoinj.wallet.DeterministicKeyChain}. When the parameter is - * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put + * {@link DeterministicKeyChain}. When the parameter is + * {@link KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put * into a receive coins wizard type UI. You should use this when the user is definitely going to hand this key out * to someone who wishes to send money. */ @@ -502,8 +502,8 @@ public class Wallet extends BaseTaggableObject /** * Returns a key/s that has not been returned by this method before (fresh). You can think of this as being * a newly created key/s, although the notion of "create" is not really valid for a - * {@link org.bitcoinj.wallet.DeterministicKeyChain}. When the parameter is - * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put + * {@link DeterministicKeyChain}. When the parameter is + * {@link KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put * into a receive coins wizard type UI. You should use this when the user is definitely going to hand this key/s out * to someone who wishes to send money. */ @@ -523,15 +523,15 @@ public class Wallet extends BaseTaggableObject } /** - * An alias for calling {@link #freshKey(org.bitcoinj.wallet.KeyChain.KeyPurpose)} with - * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. + * An alias for calling {@link #freshKey(KeyChain.KeyPurpose)} with + * {@link KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. */ public DeterministicKey freshReceiveKey() { return freshKey(KeyChain.KeyPurpose.RECEIVE_FUNDS); } /** - * Returns address for a {@link #freshKey(org.bitcoinj.wallet.KeyChain.KeyPurpose)} + * Returns address for a {@link #freshKey(KeyChain.KeyPurpose)} */ public Address freshAddress(KeyChain.KeyPurpose purpose) { Address address; @@ -546,8 +546,8 @@ public class Wallet extends BaseTaggableObject } /** - * An alias for calling {@link #freshAddress(org.bitcoinj.wallet.KeyChain.KeyPurpose)} with - * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. + * An alias for calling {@link #freshAddress(KeyChain.KeyPurpose)} with + * {@link KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. */ public Address freshReceiveAddress() { return freshAddress(KeyChain.KeyPurpose.RECEIVE_FUNDS); @@ -596,7 +596,7 @@ public class Wallet extends BaseTaggableObject /** * Returns true if the wallet contains random keys and no HD chains, in which case you should call - * {@link #upgradeToDeterministic(org.spongycastle.crypto.params.KeyParameter)} before attempting to do anything + * {@link #upgradeToDeterministic(KeyParameter)} before attempting to do anything * that would require a new address or key. */ public boolean isDeterministicUpgradeRequired() { @@ -704,7 +704,7 @@ public class Wallet extends BaseTaggableObject /** * Imports the given keys to the wallet. - * If {@link Wallet#autosaveToFile(java.io.File, long, java.util.concurrent.TimeUnit, org.bitcoinj.wallet.WalletFiles.Listener)} + * If {@link Wallet#autosaveToFile(File, long, TimeUnit, WalletFiles.Listener)} * has been called, triggers an auto save bypassing the normal coalescing delay and event handlers. * Returns the number of keys added, after duplicates are ignored. The onKeyAdded event will be called for each key * in the list that was not already present. @@ -772,7 +772,7 @@ public class Wallet extends BaseTaggableObject } } - /** See {@link org.bitcoinj.wallet.DeterministicKeyChain#setLookaheadSize(int)} for more info on this. */ + /** See {@link DeterministicKeyChain#setLookaheadSize(int)} for more info on this. */ public void setKeyChainGroupLookaheadSize(int lookaheadSize) { keyChainGroupLock.lock(); try { @@ -782,7 +782,7 @@ public class Wallet extends BaseTaggableObject } } - /** See {@link org.bitcoinj.wallet.DeterministicKeyChain#setLookaheadSize(int)} for more info on this. */ + /** See {@link DeterministicKeyChain#setLookaheadSize(int)} for more info on this. */ public int getKeyChainGroupLookaheadSize() { keyChainGroupLock.lock(); try { @@ -792,7 +792,7 @@ public class Wallet extends BaseTaggableObject } } - /** See {@link org.bitcoinj.wallet.DeterministicKeyChain#setLookaheadThreshold(int)} for more info on this. */ + /** See {@link DeterministicKeyChain#setLookaheadThreshold(int)} for more info on this. */ public void setKeyChainGroupLookaheadThreshold(int num) { keyChainGroupLock.lock(); try { @@ -803,7 +803,7 @@ public class Wallet extends BaseTaggableObject } } - /** See {@link org.bitcoinj.wallet.DeterministicKeyChain#setLookaheadThreshold(int)} for more info on this. */ + /** See {@link DeterministicKeyChain#setLookaheadThreshold(int)} for more info on this. */ public int getKeyChainGroupLookaheadThreshold() { keyChainGroupLock.lock(); try { @@ -1072,7 +1072,7 @@ public class Wallet extends BaseTaggableObject /** * Marks all keys used in the transaction output as used in the wallet. - * See {@link org.bitcoinj.wallet.DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. + * See {@link DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. */ private void markKeysAsUsed(Transaction tx) { keyChainGroupLock.lock(); @@ -1132,7 +1132,7 @@ public class Wallet extends BaseTaggableObject } /** - * Convenience wrapper around {@link Wallet#encrypt(org.bitcoinj.crypto.KeyCrypter, + * Convenience wrapper around {@link Wallet#encrypt(KeyCrypter, * org.spongycastle.crypto.params.KeyParameter)} which uses the default Scrypt key derivation algorithm and * parameters to derive a key from the given password. */ @@ -1149,7 +1149,7 @@ public class Wallet extends BaseTaggableObject /** * Encrypt the wallet using the KeyCrypter and the AES key. A good default KeyCrypter to use is - * {@link org.bitcoinj.crypto.KeyCrypterScrypt}. + * {@link KeyCrypterScrypt}. * * @param keyCrypter The KeyCrypter that specifies how to encrypt/ decrypt a key * @param aesKey AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming to create from a password) @@ -1449,7 +1449,7 @@ public class Wallet extends BaseTaggableObject /** *

* Disables auto-saving, after it had been enabled with - * {@link Wallet#autosaveToFile(java.io.File, long, java.util.concurrent.TimeUnit, org.bitcoinj.wallet.WalletFiles.Listener)} + * {@link Wallet#autosaveToFile(File, long, TimeUnit, WalletFiles.Listener)} * before. This method blocks until finished. *

*/ @@ -1679,7 +1679,7 @@ public class Wallet extends BaseTaggableObject * and if you trust the sender of the transaction you can choose to assume they are in fact valid and will not * be double spent as an optimization.

* - *

This is the same as {@link Wallet#receivePending(Transaction, java.util.List)} but allows you to override the + *

This is the same as {@link Wallet#receivePending(Transaction, List)} but allows you to override the * {@link Wallet#isPendingTransactionRelevant(Transaction)} sanity-check to keep track of transactions that are not * spendable or spend our coins. This can be useful when you want to keep track of transaction confidence on * arbitrary transactions. Note that transactions added in this way will still be relayed to peers and appear in @@ -1772,7 +1772,7 @@ public class Wallet extends BaseTaggableObject /** * This method is used by a {@link Peer} to find out if a transaction that has been announced is interesting, * that is, whether we should bother downloading its dependencies and exploring the transaction to decide how - * risky it is. If this method returns true then {@link Wallet#receivePending(Transaction, java.util.List)} + * risky it is. If this method returns true then {@link Wallet#receivePending(Transaction, List)} * will soon be called with the transactions dependencies as well. */ public boolean isPendingTransactionRelevant(Transaction tx) throws ScriptException { @@ -2111,7 +2111,7 @@ public class Wallet extends BaseTaggableObject /** *

Called by the {@link BlockChain} when a new block on the best chain is seen, AFTER relevant wallet * transactions are extracted and sent to us UNLESS the new block caused a re-org, in which case this will - * not be called (the {@link Wallet#reorganize(StoredBlock, java.util.List, java.util.List)} method will + * not be called (the {@link Wallet#reorganize(StoredBlock, List, List)} method will * call this one in that case).

*

Used to update confidence data in each transaction and last seen block hash. Triggers auto saving. * Invokes the onWalletChanged event listener if there were any affected transactions.

@@ -2252,7 +2252,7 @@ public class Wallet extends BaseTaggableObject * up with the block chain. It can also happen if a block includes a transaction we never saw at broadcast time. * If this tx double spends, it takes precedence over our pending transactions and the pending tx goes dead.

* - *

The other context it can be called is from {@link Wallet#receivePending(Transaction, java.util.List)}, + *

The other context it can be called is from {@link Wallet#receivePending(Transaction, List)}, * ie we saw a tx be broadcast or one was submitted directly that spends our own coins. If this tx double spends * it does NOT take precedence because the winner will be resolved by the miners - we assume that our version will * win, if we are wrong then when a block appears the tx will go dead.

@@ -3289,7 +3289,7 @@ public class Wallet extends BaseTaggableObject /** * Returns the earliest creation time of keys or watched scripts in this wallet, in seconds since the epoch, ie the min - * of {@link org.bitcoinj.core.ECKey#getCreationTimeSeconds()}. This can return zero if at least one key does + * of {@link ECKey#getCreationTimeSeconds()}. This can return zero if at least one key does * not have that data (was created before key timestamping was implemented).

* * This method is most often used in conjunction with {@link PeerGroup#setFastCatchupTimeSecs(long)} in order to @@ -3534,7 +3534,7 @@ public class Wallet extends BaseTaggableObject * money to fail! Finally please be aware that any listeners on the future will run either on the calling thread * if it completes immediately, or eventually on a background thread if the balance is not yet at the right * level. If you do something that means you know the balance should be sufficient to trigger the future, - * you can use {@link org.bitcoinj.utils.Threading#waitForUserCode()} to block until the future had a + * you can use {@link Threading#waitForUserCode()} to block until the future had a * chance to be updated.

*/ public ListenableFuture getBalanceFuture(final Coin value, final BalanceType type) { @@ -3686,8 +3686,8 @@ public class Wallet extends BaseTaggableObject */ USE_DUMMY_SIG, /** - * If signature is missing, {@link org.bitcoinj.signers.TransactionSigner.MissingSignatureException} - * will be thrown for P2SH and {@link org.bitcoinj.core.ECKey.MissingPrivateKeyException} for other tx types. + * If signature is missing, {@link TransactionSigner.MissingSignatureException} + * will be thrown for P2SH and {@link ECKey.MissingPrivateKeyException} for other tx types. */ THROW } @@ -4627,7 +4627,7 @@ public class Wallet extends BaseTaggableObject *

This is used to generate a BloomFilter which can be {@link BloomFilter#merge(BloomFilter)}d with another. * It could also be used if you have a specific target for the filter's size.

* - *

See the docs for {@link BloomFilter#BloomFilter(int, double, long, org.bitcoinj.core.BloomFilter.BloomUpdate)} for a brief explanation of anonymity when using bloom + *

See the docs for {@link BloomFilter#BloomFilter(int, double, long, BloomFilter.BloomUpdate)} for a brief explanation of anonymity when using bloom * filters.

*/ @Override @GuardedBy("keyChainGroupLock") @@ -5013,7 +5013,7 @@ public class Wallet extends BaseTaggableObject *

When a key rotation time is set, any money controlled by keys created before the given timestamp T will be * automatically respent to any key that was created after T. This can be used to recover from a situation where * a set of keys is believed to be compromised. You can stop key rotation by calling this method again with zero - * as the argument. Once set up, calling {@link #doMaintenance(org.spongycastle.crypto.params.KeyParameter, boolean)} + * as the argument. Once set up, calling {@link #doMaintenance(KeyParameter, boolean)} * will create and possibly send rotation transactions: but it won't be done automatically (because you might have * to ask for the users password).

* diff --git a/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java b/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java index aba888d4..f5e5e303 100644 --- a/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java +++ b/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java @@ -17,8 +17,17 @@ package org.bitcoinj.wallet; -import org.bitcoinj.core.*; +import com.google.protobuf.Message; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.PeerAddress; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; import org.bitcoinj.core.TransactionConfidence.ConfidenceType; +import org.bitcoinj.core.TransactionInput; +import org.bitcoinj.core.TransactionOutPoint; +import org.bitcoinj.core.TransactionOutput; import org.bitcoinj.crypto.KeyCrypter; import org.bitcoinj.crypto.KeyCrypterScrypt; import org.bitcoinj.script.Script; @@ -40,6 +49,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Nullable; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -59,8 +71,8 @@ import static com.google.common.base.Preconditions.checkNotNull; * format is defined by the wallet.proto file in the bitcoinj source distribution.

* * This class is used through its static methods. The most common operations are writeWallet and readWallet, which do - * the obvious operations on Output/InputStreams. You can use a {@link java.io.ByteArrayInputStream} and equivalent - * {@link java.io.ByteArrayOutputStream} if you'd like byte arrays instead. The protocol buffer can also be manipulated + * the obvious operations on Output/InputStreams. You can use a {@link ByteArrayInputStream} and equivalent + * {@link ByteArrayOutputStream} if you'd like byte arrays instead. The protocol buffer can also be manipulated * in its object form if you'd like to modify the flattened data structure before serialization to binary.

* * You can extend the wallet format with additional fields specific to your application if you want, but make sure @@ -147,7 +159,7 @@ public class WalletProtobufSerializer { /** * Returns the given wallet formatted as text. The text format is that used by protocol buffers and although it - * can also be parsed using {@link TextFormat#merge(CharSequence, com.google.protobuf.Message.Builder)}, + * can also be parsed using {@link TextFormat#merge(CharSequence, Message.Builder)}, * it is designed more for debugging than storage. It is not well specified and wallets are largely binary data * structures anyway, consisting as they do of keys (large random numbers) and {@link Transaction}s which also * mostly contain keys and hashes. @@ -617,7 +629,7 @@ public class WalletProtobufSerializer { /** * Returns the loaded protocol buffer from the given byte stream. You normally want - * {@link Wallet#loadFromFile(java.io.File, WalletExtension...)} instead - this method is designed for low level + * {@link Wallet#loadFromFile(File, WalletExtension...)} instead - this method is designed for low level * work involving the wallet file format itself. */ public static Protos.Wallet parseToProto(InputStream input) throws IOException { diff --git a/core/src/main/java/org/bitcoinj/wallet/WalletTransaction.java b/core/src/main/java/org/bitcoinj/wallet/WalletTransaction.java index b7d4cdf8..b3445fc3 100644 --- a/core/src/main/java/org/bitcoinj/wallet/WalletTransaction.java +++ b/core/src/main/java/org/bitcoinj/wallet/WalletTransaction.java @@ -21,7 +21,7 @@ import org.bitcoinj.core.Transaction; import static com.google.common.base.Preconditions.checkNotNull; /** - * Stores data about a transaction that is only relevant to the {@link org.bitcoinj.wallet.Wallet} class. + * Stores data about a transaction that is only relevant to the {@link Wallet} class. */ public class WalletTransaction { public enum Pool { diff --git a/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.java b/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.java index f883e44a..86ed9802 100644 --- a/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.java +++ b/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.java @@ -31,7 +31,7 @@ public interface WalletCoinsReceivedEventListener { * was broadcast across the network or because a block was received. If a transaction is seen when it was broadcast, * onCoinsReceived won't be called again when a block containing it is received. If you want to know when such a * transaction receives its first confirmation, register a {@link TransactionConfidence} event listener using - * the object retrieved via {@link org.bitcoinj.core.Transaction#getConfidence()}. It's safe to modify the + * the object retrieved via {@link Transaction#getConfidence()}. It's safe to modify the * wallet in this callback, for example, by spending the transaction just received. * * @param wallet The wallet object that received the coins diff --git a/core/src/test/java/org/bitcoinj/testing/InboundMessageQueuer.java b/core/src/test/java/org/bitcoinj/testing/InboundMessageQueuer.java index 24519e38..3c4ebfa8 100644 --- a/core/src/test/java/org/bitcoinj/testing/InboundMessageQueuer.java +++ b/core/src/test/java/org/bitcoinj/testing/InboundMessageQueuer.java @@ -26,7 +26,7 @@ import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; /** - * An extension of {@link org.bitcoinj.core.PeerSocketHandler} that keeps inbound messages in a queue for later processing + * An extension of {@link PeerSocketHandler} that keeps inbound messages in a queue for later processing */ public abstract class InboundMessageQueuer extends PeerSocketHandler { public final BlockingQueue inboundMessages = new ArrayBlockingQueue<>(1000); diff --git a/tools/src/main/java/org/bitcoinj/tools/BlockImporter.java b/tools/src/main/java/org/bitcoinj/tools/BlockImporter.java index 1102795b..f4fce52c 100644 --- a/tools/src/main/java/org/bitcoinj/tools/BlockImporter.java +++ b/tools/src/main/java/org/bitcoinj/tools/BlockImporter.java @@ -25,7 +25,7 @@ import com.google.common.base.Preconditions; import java.io.File; -/** Very thin wrapper around {@link org.bitcoinj.utils.BlockFileLoader} */ +/** Very thin wrapper around {@link BlockFileLoader} */ public class BlockImporter { public static void main(String[] args) throws BlockStoreException, VerificationException, PrunedException { System.out.println("USAGE: BlockImporter (prod|test) (H2|Disk|MemFull|Mem|SPV) [blockStore]"); diff --git a/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java b/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java index 0cc0a1f6..32af2e4a 100644 --- a/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java +++ b/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java @@ -26,6 +26,7 @@ import org.bitcoinj.wallet.SendRequest; import org.bitcoinj.wallet.Wallet; import java.io.File; +import java.util.concurrent.ExecutionException; /** * A program that sends a transaction with the specified fee and measures how long it takes to confirm. @@ -57,7 +58,7 @@ public class TestFeeLevel { } } - private static void go(Coin feeRateToTest, int numOutputs) throws InterruptedException, java.util.concurrent.ExecutionException, InsufficientMoneyException { + private static void go(Coin feeRateToTest, int numOutputs) throws InterruptedException, ExecutionException, InsufficientMoneyException { System.out.println("Wallet has " + kit.wallet().getBalance().toFriendlyString() + "; current receive address is " + kit.wallet().currentReceiveAddress()); diff --git a/wallettemplate/src/main/java/wallettemplate/utils/ThrottledRunLater.java b/wallettemplate/src/main/java/wallettemplate/utils/ThrottledRunLater.java index 1c188a09..f4fbe08e 100644 --- a/wallettemplate/src/main/java/wallettemplate/utils/ThrottledRunLater.java +++ b/wallettemplate/src/main/java/wallettemplate/utils/ThrottledRunLater.java @@ -21,7 +21,7 @@ import javafx.application.Platform; import java.util.concurrent.atomic.AtomicBoolean; /** - * A simple wrapper around {@link javafx.application.Platform#runLater(Runnable)} which will do nothing if the previous + * A simple wrapper around {@link Platform#runLater(Runnable)} which will do nothing if the previous * invocation of runLater didn't execute on the JavaFX UI thread yet. In this way you can avoid flooding * the event loop if you have a background thread that for whatever reason wants to update the UI very * frequently. Without this class you could end up bloating up memory usage and causing the UI to stutter