mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 13:37:24 +00:00
remove unused imports and unused local variables
This commit is contained in:
@@ -29,7 +29,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.math.BigInteger;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
@@ -27,8 +27,6 @@ import org.bitcoinj.script.*;
|
||||
import org.bitcoinj.store.BlockStore;
|
||||
import org.bitcoinj.store.BlockStoreException;
|
||||
|
||||
import org.bitcoinj.store.BlockStore;
|
||||
import org.bitcoinj.store.BlockStoreException;
|
||||
import org.bitcoinj.utils.MonetaryFormat;
|
||||
|
||||
import javax.annotation.*;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.bitcoinj.core;
|
||||
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
||||
/**
|
||||
* An interface which provides the information required to properly filter data downloaded from Peers.
|
||||
|
||||
@@ -1104,7 +1104,6 @@ public class Transaction extends ChildMessage implements Serializable {
|
||||
public List<TransactionOutput> getWalletOutputs(TransactionBag transactionBag){
|
||||
maybeParse();
|
||||
List<TransactionOutput> walletOutputs = new LinkedList<TransactionOutput>();
|
||||
Coin v = Coin.ZERO;
|
||||
for (TransactionOutput o : outputs) {
|
||||
if (!o.isMineOrWatched(transactionBag)) continue;
|
||||
walletOutputs.add(o);
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.bitcoinj.core;
|
||||
|
||||
import org.bitcoinj.utils.*;
|
||||
import org.slf4j.*;
|
||||
|
||||
import javax.annotation.*;
|
||||
import java.lang.ref.*;
|
||||
@@ -38,7 +37,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
* all transactions not currently included in the best chain - it's simply a cache.</p>
|
||||
*/
|
||||
public class TxConfidenceTable {
|
||||
private static final Logger log = LoggerFactory.getLogger(TxConfidenceTable.class);
|
||||
protected ReentrantLock lock = Threading.lock("txconfidencetable");
|
||||
|
||||
private static class WeakConfidenceReference extends WeakReference<TransactionConfidence> {
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.bitcoinj.jni;
|
||||
|
||||
import org.bitcoinj.core.Sha256Hash;
|
||||
import org.bitcoinj.core.Transaction;
|
||||
import org.bitcoinj.core.TransactionConfidence;
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
import static org.bitcoinj.script.ScriptOpCodes.*;
|
||||
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
package org.bitcoinj.store;
|
||||
|
||||
import org.bitcoinj.core.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.sql.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -37,8 +34,6 @@ import java.util.List;
|
||||
* decreases the space usage somewhat (to only around 1.3G).
|
||||
*/
|
||||
public class H2FullPrunedBlockStore extends DatabaseFullPrunedBlockStore {
|
||||
private static final Logger log = LoggerFactory.getLogger(H2FullPrunedBlockStore.class);
|
||||
|
||||
private static final String H2_DUPLICATE_KEY_ERROR_CODE = "23505";
|
||||
private static final String DATABASE_DRIVER_CLASS = "org.h2.Driver";
|
||||
private static final String DATABASE_CONNECTION_URL_PREFIX = "jdbc:h2:";
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
package org.bitcoinj.store;
|
||||
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -29,8 +27,6 @@ import java.util.List;
|
||||
* the quantity of bitcoins controlled by that address.</p>
|
||||
*/
|
||||
public class MySQLFullPrunedBlockStore extends DatabaseFullPrunedBlockStore {
|
||||
private static final Logger log = LoggerFactory.getLogger(MySQLFullPrunedBlockStore.class);
|
||||
|
||||
private static final String MYSQL_DUPLICATE_KEY_ERROR_CODE = "23000";
|
||||
private static final String DATABASE_DRIVER_CLASS = "com.mysql.jdbc.Driver";
|
||||
private static final String DATABASE_CONNECTION_URL_PREFIX = "jdbc:mysql://";
|
||||
|
||||
@@ -170,19 +170,6 @@ public final class BtcFixedFormat extends BtcFormat {
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
String label;
|
||||
switch(scale) {
|
||||
case COIN_SCALE:
|
||||
label = "Coin-format";
|
||||
break;
|
||||
case MILLICOIN_SCALE:
|
||||
label = "Millicoin-format";
|
||||
break;
|
||||
case MICROCOIN_SCALE:
|
||||
label = "Microcoin-format";
|
||||
break;
|
||||
default: label = "Fixed (" + String.valueOf(scale) + ") format";
|
||||
}
|
||||
return prefixLabel(scale) + "format " + pattern();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.bitcoinj.wallet;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.bitcoinj.crypto.*;
|
||||
import org.bitcoinj.store.UnreadableWalletException;
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.bitcoinj.crypto.*;
|
||||
import org.bitcoinj.store.UnreadableWalletException;
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.base.Splitter;
|
||||
import org.spongycastle.crypto.params.KeyParameter;
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.bitcoinj.wallet;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.bitcoinj.crypto.ChildNumber;
|
||||
import org.bitcoinj.crypto.DeterministicKey;
|
||||
import org.bitcoinj.crypto.KeyCrypter;
|
||||
import org.bitcoinj.store.UnreadableWalletException;
|
||||
|
||||
@@ -782,7 +782,6 @@ public class KeyChainGroup implements KeyBag {
|
||||
|
||||
private static void extractFollowingKeychains(List<DeterministicKeyChain> chains) {
|
||||
// look for following key chains and map them to the watch keys of followed keychains
|
||||
Multimap<DeterministicKey, DeterministicKeyChain> followingKeychains = HashMultimap.create();
|
||||
List<DeterministicKeyChain> followingChains = Lists.newArrayList();
|
||||
for (Iterator<DeterministicKeyChain> it = chains.iterator(); it.hasNext(); ) {
|
||||
DeterministicKeyChain chain = it.next();
|
||||
|
||||
@@ -23,7 +23,6 @@ import org.junit.Test;
|
||||
import static org.bitcoinj.core.Utils.HEX;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.Iterables;
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.params.MainNetParams;
|
||||
import org.bitcoinj.params.UnitTestParams;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -33,7 +33,6 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
|
||||
public class KeyChainGroupTest {
|
||||
// Number of initial keys in this tests HD wallet, including interior keys.
|
||||
|
||||
@@ -23,7 +23,6 @@ import org.bitcoinj.store.BlockStore;
|
||||
import org.bitcoinj.store.MemoryBlockStore;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.InetAddress;
|
||||
|
||||
/**
|
||||
* RefreshWallet loads a wallet, then processes the block chain to update the transaction pools within it.
|
||||
|
||||
Reference in New Issue
Block a user