diff --git a/core/pom.xml b/core/pom.xml
index 9941a77e4..2deb1e217 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -149,7 +149,7 @@
Implementors can listen to events indicating a new peer connecting. Implementors can listen to events like peer discovery, connect or disconnects. Implementors can listen to events indicating a peer disconnecting. A generic interface for an object which keeps track of a set of open client connections, creates new ones and
* ensures they are serviced properly. When the service is {@link com.google.common.util.concurrent.Service#stop()}ed, all connections will be closed and
+ * When the service is stopped via {@link com.google.common.util.concurrent.Service#stopAsync()}, all connections will be closed and
* the appropriate connectionClosed() calls must be made.
DNS seeds do not attempt to enumerate every peer on the network. {@link DnsDiscovery#getPeers(long, java.util.concurrent.TimeUnit)} + *
DNS seeds do not attempt to enumerate every peer on the network. {@link DnsDiscovery#getPeers(long, long, TimeUnit)} * will return up to 30 random peers from the set of those returned within the timeout period. If you want more peers * to connect to, you need to discover them via other means (like addr broadcasts).
*/ diff --git a/core/src/main/java/org/bitcoinj/net/discovery/PeerDiscovery.java b/core/src/main/java/org/bitcoinj/net/discovery/PeerDiscovery.java index 72452c25d..0b66e361a 100644 --- a/core/src/main/java/org/bitcoinj/net/discovery/PeerDiscovery.java +++ b/core/src/main/java/org/bitcoinj/net/discovery/PeerDiscovery.java @@ -20,6 +20,8 @@ package org.bitcoinj.net.discovery; import java.net.InetSocketAddress; import java.util.concurrent.TimeUnit; +import org.bitcoinj.core.VersionMessage; + /** * A PeerDiscovery object is responsible for finding addresses of other nodes in the Bitcoin P2P network. Note that * the addresses returned may or may not be accepting connections. 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 7e788c110..896953cff 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 PaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or + * {@link org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.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 PaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} + * {@link org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.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.
* 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 6c8d4131c..1bd47e410 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClient.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClient.java @@ -539,7 +539,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 ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or + * {@link org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or * {@link PaymentChannelClient#settle()} is called, to actually handle the connection close logic.
*/ @Override @@ -559,7 +559,7 @@ public class PaymentChannelClient implements IPaymentChannelClient { * payment transaction. * *Note that this only generates a CLOSE message for the server and calls - * {@link ClientConnection#destroyConnection(CloseReason)} to settle the connection, it does not + * {@link org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.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 25e92a347..3a9faa10d 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java @@ -102,7 +102,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 {@param timeWindow} + * connection is open. The server is requested to keep the channel open for {@code timeoutSeconds} * seconds. If the server proposes a longer time the channel will be closed. * * @param server The host/port pair where the server is listening. 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 a91d36e2b..40a0fb03c 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, ClientChannelProperties)}, which moves the channel into state + *
To begin, the client calls {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.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, ClientChannelProperties)} after construction (to avoid creating objects for channels which are + * {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.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, ClientChannelProperties)} to create the Multisig contract and refund transaction. + * {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.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, ClientChannelProperties)} + * the channel properly. May only be called after {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} */ public abstract Coin getRefundTxFees(); @@ -415,7 +415,7 @@ public abstract class PaymentChannelClientState { /** * Gets the contract without changing the state machine - * @return + * @return the contract. */ protected abstract Transaction getContractInternal(); @@ -424,7 +424,7 @@ public abstract class PaymentChannelClientState { /** * Gets the script that is signed. In the case of a P2SH contract this is the * script inside the P2SH script. - * @return + * @return the signed script. */ protected abstract Script getSignedScript(); } 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 8aa50a1ac..fcb3ae8be 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 ServerConnection#destroyConnection(CloseReason)} or + * {@link org.bitcoinj.protocols.channels.PaymentChannelServer.ServerConnection#destroyConnection(org.bitcoinj.protocols.channels.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 ServerConnection#destroyConnection(CloseReason)}. Note that this does not broadcast + * {@link org.bitcoinj.protocols.channels.PaymentChannelServer.ServerConnection#destroyConnection(org.bitcoinj.protocols.channels.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/PaymentChannelServerState.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerState.java index 871a7f0ef..63f37b6db 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerState.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerState.java @@ -386,7 +386,7 @@ public abstract class PaymentChannelServerState { /** * Gets the script that signatures should sign against. This is never a P2SH * script, rather the script that would be inside a P2SH script. - * @return + * @return the script that signatures should sign against. */ protected abstract Script getSignedScript(); 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 f1d741a4a..4e06a1a9f 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV1ClientState.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV1ClientState.java @@ -72,9 +72,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, ClientChannelProperties)} after construction (to avoid creating objects for channels which are + * {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.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, ClientChannelProperties)} to create the Multisig contract and refund transaction. + * {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.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 448f0b358..708c6db6b 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 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 State#ERROR}.
+ *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}.
* - *If the current state is before {@link State#READY} (ie we have not finished initializing the channel), we - * simply set the state to {@link State#CLOSED} and let the client handle getting its refund transaction confirmed. + *
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. *
* * @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/PaymentChannelV2ServerState.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV2ServerState.java index 10404ad3e..169404be1 100644 --- a/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV2ServerState.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelV2ServerState.java @@ -118,7 +118,7 @@ public class PaymentChannelV2ServerState extends PaymentChannelServerState { /** * Creates a P2SH script outputting to the client and server pubkeys - * @return + * @return a P2SH script. */ @Override protected Script createOutputScript() { 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 e440269c5..f583f25ee 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 Protos.PaymentRequest.Builder#build} to get the actual payment + * {@link #signPaymentRequest}. Use {@link org.bitcoin.protocols.payments.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 Protos.PaymentRequest.Builder#build} to get the actual payment request. + * {@link org.bitcoin.protocols.payments.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 Protos.PaymentRequest}. + * @return verification data, or null if no PKI method was specified in the {@link org.bitcoin.protocols.payments.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 5e25047af..2c91b63dd 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; * *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 Protos.Payment} message will be sent + *
Call sendPayment with a list of transactions that will be broadcast. A {@link org.bitcoin.protocols.payments.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 Protos.PaymentACK} is received from the merchant. Typically a wallet will show the message to the user + * {@link org.bitcoin.protocols.payments.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 Protos.PaymentRequest} object may + * uri is a BIP-72-style BitcoinURI object that specifies where the {@link org.bitcoin.protocols.payments.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 Protos.PaymentRequest} object may + * uri is a BIP-72-style BitcoinURI object that specifies where the {@link org.bitcoin.protocols.payments.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 Protos.PaymentRequest} object may + * uri is a BIP-72-style BitcoinURI object that specifies where the {@link org.bitcoin.protocols.payments.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 Protos.PaymentRequest} object may be fetched. + * url is an address where the {@link org.bitcoin.protocols.payments.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 Protos.PaymentRequest} object may be fetched. + * url is an address where the {@link org.bitcoin.protocols.payments.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 Protos.PaymentRequest} object may be fetched. + * url is an address where the {@link org.bitcoin.protocols.payments.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 Protos.PaymentRequest}. + * Creates a PaymentSession from the provided {@link org.bitcoin.protocols.payments.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 Protos.PaymentRequest}. + * Creates a PaymentSession from the provided {@link org.bitcoin.protocols.payments.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 Protos.PaymentRequest}. + * Creates a PaymentSession from the provided {@link org.bitcoin.protocols.payments.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 2c89a4738..6f1268900 100644 --- a/core/src/main/java/org/bitcoinj/script/Script.java +++ b/core/src/main/java/org/bitcoinj/script/Script.java @@ -310,7 +310,7 @@ public class Script { /** * Retrieves the sender public key from a LOCKTIMEVERIFY transaction - * @return + * @return the sender public key * @throws ScriptException */ public byte[] getCLTVPaymentChannelSenderPubKey() throws ScriptException { @@ -322,7 +322,7 @@ public class Script { /** * Retrieves the recipient public key from a LOCKTIMEVERIFY transaction - * @return + * @return the recipient public key * @throws ScriptException */ public byte[] getCLTVPaymentChannelRecipientPubKey() throws ScriptException { diff --git a/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java b/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java index 5e020e8af..1d114c560 100644 --- a/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java +++ b/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java @@ -135,7 +135,7 @@ public class ScriptBuilder { * Adds the given number as a OP_N opcode to the end of the program. * Only handles values 0-16 inclusive. * - * @see #number(int) + * @see #number(long) */ public ScriptBuilder smallNum(int num) { return smallNum(chunks.size(), num); @@ -146,7 +146,7 @@ public class ScriptBuilder { * it will accept numbers in the range 0-16 inclusive, the encoding would be * considered non-standard. * - * @see #number(int) + * @see #number(long) */ protected ScriptBuilder bigNum(long num) { return bigNum(chunks.size(), num); @@ -156,7 +156,7 @@ public class ScriptBuilder { * Adds the given number as a OP_N opcode to the given index in the program. * Only handles values 0-16 inclusive. * - * @see #number(int) + * @see #number(long) */ public ScriptBuilder smallNum(int index, int num) { checkArgument(num >= 0, "Cannot encode negative numbers with smallNum"); @@ -170,7 +170,7 @@ public class ScriptBuilder { * it will accept numbers in the range 0-16 inclusive, the encoding would be * considered non-standard. * - * @see #number(int) + * @see #number(long) */ protected ScriptBuilder bigNum(int index, long num) { final byte[] data; diff --git a/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java index ee02a31a6..c61effdc7 100644 --- a/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java @@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; *
*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 ProposedTransaction} object that will be also passed then to the next signer in chain. This allows other + * {@link org.bitcoinj.signers.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.
diff --git a/core/src/main/java/org/bitcoinj/utils/BtcFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java index dd72be0f6..eacbfe0ff 100644 --- a/core/src/main/java/org/bitcoinj/utils/BtcFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java @@ -1378,7 +1378,6 @@ public abstract class BtcFormat extends Format { * * @param scale Number of places the decimal point will be shifted when formatting * a quantity of satoshis. - * @return The DecimalFormatSymbols before changing */ protected static void prefixUnitsIndicator(DecimalFormat numberFormat, int scale) { checkState(Thread.holdsLock(numberFormat)); // make sure caller intends to reset before changing diff --git a/core/src/main/java/org/bitcoinj/utils/Threading.java b/core/src/main/java/org/bitcoinj/utils/Threading.java index db76d7326..c3e1db5f2 100644 --- a/core/src/main/java/org/bitcoinj/utils/Threading.java +++ b/core/src/main/java/org/bitcoinj/utils/Threading.java @@ -50,10 +50,8 @@ public class Threading { public static Executor USER_THREAD; /** - * A dummy executor that just invokes the runnable immediately. Use this over - * {@link com.google.common.util.concurrent.MoreExecutors#sameThreadExecutor()} because the latter creates a new - * object each time in order to implement the more complex {@link ExecutorService} interface, which is overkill - * for our needs. + * A dummy executor that just invokes the runnable immediately. Use this over more complex executors + * (e.g. those extending {@link ExecutorService}), which are overkill for our needs. */ public static final Executor SAME_THREAD; diff --git a/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java b/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java index 7afd6d73c..4f3d411eb 100644 --- a/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java @@ -594,7 +594,6 @@ public class KeyChainGroup implements KeyBag { return filter; } - /** {@inheritDoc} */ public boolean isRequiringUpdateAllBloomFilter() { throw new UnsupportedOperationException(); // Unused. } diff --git a/core/src/main/java/org/bitcoinj/wallet/SendRequest.java b/core/src/main/java/org/bitcoinj/wallet/SendRequest.java index 9d17fafd1..d6a69ff68 100644 --- a/core/src/main/java/org/bitcoinj/wallet/SendRequest.java +++ b/core/src/main/java/org/bitcoinj/wallet/SendRequest.java @@ -58,7 +58,7 @@ public class SendRequest { * *If there are already inputs to the transaction, make sure their out point has a connected output, * otherwise their value will be added to fee. Also ensure they are either signed or are spendable by a wallet - * key, otherwise the behavior of {@link Wallet#completeTx(Wallet.SendRequest)} is undefined (likely + * key, otherwise the behavior of {@link Wallet#completeTx(SendRequest)} is undefined (likely * RuntimeException).
*/ public Transaction tx; diff --git a/core/src/main/java/org/bitcoinj/wallet/Wallet.java b/core/src/main/java/org/bitcoinj/wallet/Wallet.java index 17df03f02..497137337 100644 --- a/core/src/main/java/org/bitcoinj/wallet/Wallet.java +++ b/core/src/main/java/org/bitcoinj/wallet/Wallet.java @@ -3443,7 +3443,7 @@ public class Wallet extends BaseTaggableObject } /** - * Get the description of the wallet. See {@link Wallet#setDescription(String))} + * Get the description of the wallet. See {@link Wallet#setDescription(String)} */ public String getDescription() { return description; @@ -3720,7 +3720,7 @@ 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 ECKey.MissingPrivateKeyException} for other tx types. + * will be thrown for P2SH and {@link org.bitcoinj.core.ECKey.MissingPrivateKeyException} for other tx types. */ THROW } @@ -3735,7 +3735,7 @@ public class Wallet extends BaseTaggableObject * and lets you see the proposed transaction before anything is done with it. * *This is a helper method that is equivalent to using {@link SendRequest#to(Address, Coin)} - * followed by {@link Wallet#completeTx(Wallet.SendRequest)} and returning the requests transaction object. + * followed by {@link Wallet#completeTx(SendRequest)} and returning the requests transaction object. * Note that this means a fee may be automatically added if required, if you want more control over the process, * just do those two steps yourself.
* @@ -3768,7 +3768,7 @@ public class Wallet extends BaseTaggableObject * Sends coins to the given address but does not broadcast the resulting pending transaction. It is still stored * in the wallet, so when the wallet is added to a {@link PeerGroup} or {@link Peer} the transaction will be * announced to the network. The given {@link SendRequest} is completed first using - * {@link Wallet#completeTx(Wallet.SendRequest)} to make it valid. + * {@link Wallet#completeTx(SendRequest)} to make it valid. * * @return the Transaction that was created * @throws InsufficientMoneyException if the request could not be completed due to not enough balance. @@ -4675,7 +4675,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(int, double)} for a brief explanation of anonymity when using bloom + *
See the docs for {@link BloomFilter#BloomFilter(int, double, long, org.bitcoinj.core.BloomFilter.BloomUpdate)} for a brief explanation of anonymity when using bloom * filters.
*/ @Override @GuardedBy("keyChainGroupLock") diff --git a/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java b/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java index 397bf709f..bcd5f1b28 100644 --- a/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java +++ b/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java @@ -125,7 +125,7 @@ public class WalletProtobufSerializer { } /** - * Change buffer size for writing wallet to output stream. Default is {@link com.google.protobuf.CodedOutputStream.DEFAULT_BUFFER_SIZE} + * Change buffer size for writing wallet to output stream. Default is {@link com.google.protobuf.CodedOutputStream#DEFAULT_BUFFER_SIZE} * @param walletWriteBufferSize - buffer size in bytes */ public void setWalletWriteBufferSize(int walletWriteBufferSize) { @@ -418,7 +418,7 @@ public class WalletProtobufSerializer { * Wallet object with {@code forceReset} set {@code true}. It won't work. * *If {@code forceReset} is {@code true}, then no transactions are loaded from the wallet, and it is configured - * to replay transactions from the blockchain (as if the wallet had been loaded and {@link Wallet.reset} + * to replay transactions from the blockchain (as if the wallet had been loaded and {@link Wallet#reset()} * had been called immediately thereafter). * *
A wallet can be unreadable for various reasons, such as inability to open the file, corrupt data, internally @@ -467,7 +467,7 @@ public class WalletProtobufSerializer { * Wallet object with {@code forceReset} set {@code true}. It won't work.
* *If {@code forceReset} is {@code true}, then no transactions are loaded from the wallet, and it is configured - * to replay transactions from the blockchain (as if the wallet had been loaded and {@link Wallet.reset} + * to replay transactions from the blockchain (as if the wallet had been loaded and {@link Wallet#reset()} * had been called immediately thereafter). * *
A wallet can be unreadable for various reasons, such as inability to open the file, corrupt data, internally 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 3242146af..14eb220d2 100644 --- a/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.java +++ b/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.java @@ -18,6 +18,7 @@ package org.bitcoinj.wallet.listeners; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; import org.bitcoinj.wallet.Wallet; /**