mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-19 05:33:44 +01:00
org.bitcoinj.base: move Network to base
This commit is contained in:
parent
26117bbda8
commit
bfa6536942
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.bitcoinj.utils;
|
||||
package org.bitcoinj.base;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
package org.bitcoinj.core;
|
||||
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.ScriptType;
|
||||
import org.bitcoinj.base.exceptions.AddressFormatException;
|
||||
import org.bitcoinj.utils.Network;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Arrays;
|
||||
|
@ -18,6 +18,7 @@
|
||||
package org.bitcoinj.core;
|
||||
|
||||
import org.bitcoinj.base.Coin;
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.Sha256Hash;
|
||||
import org.bitcoinj.params.AbstractBitcoinNetParams;
|
||||
import org.bitcoinj.params.MainNetParams;
|
||||
@ -30,7 +31,6 @@ import org.bitcoinj.script.Script;
|
||||
import org.bitcoinj.store.BlockStore;
|
||||
import org.bitcoinj.store.BlockStoreException;
|
||||
import org.bitcoinj.base.utils.MonetaryFormat;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.bitcoinj.utils.VersionTally;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -19,6 +19,7 @@ package org.bitcoinj.kits;
|
||||
|
||||
import com.google.common.io.Closeables;
|
||||
import com.google.common.util.concurrent.AbstractIdleService;
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.ScriptType;
|
||||
import org.bitcoinj.core.BlockChain;
|
||||
import org.bitcoinj.core.CheckpointManager;
|
||||
@ -34,7 +35,6 @@ import org.bitcoinj.net.discovery.PeerDiscovery;
|
||||
import org.bitcoinj.store.BlockStore;
|
||||
import org.bitcoinj.store.BlockStoreException;
|
||||
import org.bitcoinj.store.SPVBlockStore;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.bitcoinj.wallet.DeterministicSeed;
|
||||
import org.bitcoinj.wallet.KeyChainGroup;
|
||||
import org.bitcoinj.wallet.KeyChainGroupStructure;
|
||||
|
@ -18,6 +18,7 @@
|
||||
package org.bitcoinj.params;
|
||||
|
||||
import com.google.common.base.Stopwatch;
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.utils.ByteUtils;
|
||||
import org.bitcoinj.core.BitcoinSerializer;
|
||||
import org.bitcoinj.core.Block;
|
||||
@ -32,7 +33,6 @@ import org.bitcoinj.protocols.payments.PaymentProtocol;
|
||||
import org.bitcoinj.store.BlockStore;
|
||||
import org.bitcoinj.store.BlockStoreException;
|
||||
import org.bitcoinj.base.utils.MonetaryFormat;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -17,10 +17,10 @@
|
||||
|
||||
package org.bitcoinj.params;
|
||||
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.utils.ByteUtils;
|
||||
import org.bitcoinj.core.Block;
|
||||
import org.bitcoinj.base.Sha256Hash;
|
||||
import org.bitcoinj.utils.Network;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
|
@ -17,10 +17,10 @@
|
||||
|
||||
package org.bitcoinj.params;
|
||||
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.utils.ByteUtils;
|
||||
import org.bitcoinj.core.Block;
|
||||
import org.bitcoinj.base.Sha256Hash;
|
||||
import org.bitcoinj.utils.Network;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
|
@ -16,10 +16,10 @@
|
||||
|
||||
package org.bitcoinj.params;
|
||||
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.utils.ByteUtils;
|
||||
import org.bitcoinj.core.Block;
|
||||
import org.bitcoinj.base.Sha256Hash;
|
||||
import org.bitcoinj.utils.Network;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
package org.bitcoinj.params;
|
||||
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.utils.ByteUtils;
|
||||
import org.bitcoinj.core.Block;
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
@ -25,7 +26,6 @@ import org.bitcoinj.core.StoredBlock;
|
||||
import org.bitcoinj.core.VerificationException;
|
||||
import org.bitcoinj.store.BlockStore;
|
||||
import org.bitcoinj.store.BlockStoreException;
|
||||
import org.bitcoinj.utils.Network;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.Date;
|
||||
|
@ -17,10 +17,10 @@
|
||||
|
||||
package org.bitcoinj.params;
|
||||
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.utils.ByteUtils;
|
||||
import org.bitcoinj.core.Block;
|
||||
import org.bitcoinj.core.Utils;
|
||||
import org.bitcoinj.utils.Network;
|
||||
|
||||
/**
|
||||
* Network parameters used by the bitcoinj unit tests (and potentially your own). This lets you solve a block using
|
||||
|
@ -18,11 +18,11 @@ package org.bitcoinj.wallet;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import org.bitcoinj.base.Coin;
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.core.Transaction;
|
||||
import org.bitcoinj.core.TransactionConfidence;
|
||||
import org.bitcoinj.core.TransactionOutput;
|
||||
import org.bitcoinj.utils.Network;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
package org.bitcoinj.wallet;
|
||||
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.core.ECKey;
|
||||
import org.bitcoinj.core.ECKey.ECDSASignature;
|
||||
import org.bitcoinj.core.SignatureDecodeException;
|
||||
@ -26,7 +27,6 @@ import org.bitcoinj.core.TransactionInput;
|
||||
import org.bitcoinj.core.TransactionOutput;
|
||||
import org.bitcoinj.crypto.TransactionSignature;
|
||||
import org.bitcoinj.script.ScriptChunk;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
package org.bitcoinj.wallet;
|
||||
|
||||
import com.google.protobuf.ByteString;
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.core.Address;
|
||||
import org.bitcoinj.core.BloomFilter;
|
||||
import org.bitcoinj.core.ECKey;
|
||||
@ -35,7 +36,6 @@ import org.bitcoinj.base.ScriptType;
|
||||
import org.bitcoinj.script.ScriptBuilder;
|
||||
import org.bitcoinj.script.ScriptPattern;
|
||||
import org.bitcoinj.utils.ListenerRegistration;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.bitcoinj.utils.Threading;
|
||||
import org.bitcoinj.wallet.listeners.CurrentKeyChangeEventListener;
|
||||
import org.bitcoinj.wallet.listeners.KeyChainEventListener;
|
||||
|
@ -16,11 +16,11 @@
|
||||
|
||||
package org.bitcoinj.wallet;
|
||||
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.ScriptType;
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.crypto.ChildNumber;
|
||||
import org.bitcoinj.crypto.HDPath;
|
||||
import org.bitcoinj.utils.Network;
|
||||
|
||||
/**
|
||||
* Defines a structure for hierarchical deterministic wallets.
|
||||
|
@ -24,6 +24,7 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.math.IntMath;
|
||||
import com.google.protobuf.ByteString;
|
||||
import net.jcip.annotations.GuardedBy;
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.core.AbstractBlockChain;
|
||||
import org.bitcoinj.core.Address;
|
||||
import org.bitcoinj.base.Base58;
|
||||
@ -81,7 +82,6 @@ import org.bitcoinj.utils.BaseTaggableObject;
|
||||
import org.bitcoinj.utils.FutureUtils;
|
||||
import org.bitcoinj.utils.ListenableCompletableFuture;
|
||||
import org.bitcoinj.utils.ListenerRegistration;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.bitcoinj.utils.Threading;
|
||||
import org.bitcoinj.wallet.Protos.Wallet.EncryptionType;
|
||||
import org.bitcoinj.wallet.WalletTransaction.Pool;
|
||||
|
@ -19,6 +19,7 @@ package org.bitcoinj.core;
|
||||
|
||||
import nl.jqno.equalsverifier.EqualsVerifier;
|
||||
import nl.jqno.equalsverifier.Warning;
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.exceptions.AddressFormatException;
|
||||
import org.bitcoinj.base.utils.ByteUtils;
|
||||
import org.bitcoinj.params.MainNetParams;
|
||||
@ -28,7 +29,6 @@ import org.bitcoinj.script.Script;
|
||||
import org.bitcoinj.base.ScriptType;
|
||||
import org.bitcoinj.script.ScriptBuilder;
|
||||
import org.bitcoinj.script.ScriptPattern;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
|
@ -18,6 +18,7 @@
|
||||
package org.bitcoinj.core;
|
||||
|
||||
import org.bitcoinj.base.Coin;
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.ScriptType;
|
||||
import org.bitcoinj.base.Sha256Hash;
|
||||
import org.bitcoinj.core.TransactionConfidence.ConfidenceType;
|
||||
@ -29,7 +30,6 @@ import org.bitcoinj.script.ScriptBuilder;
|
||||
import org.bitcoinj.script.ScriptError;
|
||||
import org.bitcoinj.script.ScriptException;
|
||||
import org.bitcoinj.testing.FakeTxBuilder;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.easymock.EasyMock;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
@ -20,7 +20,7 @@ import org.bitcoinj.base.ScriptType;
|
||||
import org.bitcoinj.core.Context;
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.crypto.HDPath;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
@ -34,8 +34,8 @@ import java.util.stream.Stream;
|
||||
|
||||
import static org.bitcoinj.base.ScriptType.P2PKH;
|
||||
import static org.bitcoinj.base.ScriptType.P2WPKH;
|
||||
import static org.bitcoinj.utils.Network.MAIN;
|
||||
import static org.bitcoinj.utils.Network.TEST;
|
||||
import static org.bitcoinj.base.Network.MAIN;
|
||||
import static org.bitcoinj.base.Network.TEST;
|
||||
import static org.bitcoinj.wallet.KeyChainGroupStructure.BIP43;
|
||||
import static org.bitcoinj.wallet.KeyChainGroupStructure.BIP32;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
@ -17,13 +17,13 @@
|
||||
|
||||
package org.bitcoinj.tools;
|
||||
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.Sha256Hash;
|
||||
import org.bitcoinj.core.*;
|
||||
import org.bitcoinj.net.discovery.DnsDiscovery;
|
||||
import org.bitcoinj.store.BlockStore;
|
||||
import org.bitcoinj.store.MemoryBlockStore;
|
||||
import org.bitcoinj.utils.BriefLogFormatter;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.bitcoinj.utils.Threading;
|
||||
import picocli.CommandLine;
|
||||
|
||||
|
@ -20,6 +20,7 @@ import com.google.common.util.concurrent.Service;
|
||||
import javafx.application.Platform;
|
||||
import javafx.scene.input.KeyCombination;
|
||||
import javafx.stage.Stage;
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.ScriptType;
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.core.Utils;
|
||||
@ -27,7 +28,6 @@ import org.bitcoinj.kits.WalletAppKit;
|
||||
import org.bitcoinj.params.RegTestParams;
|
||||
import org.bitcoinj.utils.AppDataDirectory;
|
||||
import org.bitcoinj.utils.BriefLogFormatter;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.bitcoinj.utils.Threading;
|
||||
import org.bitcoinj.wallet.DeterministicSeed;
|
||||
import org.bitcoinj.wallet.KeyChainGroupStructure;
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
package org.bitcoinj.wallettool;
|
||||
|
||||
import org.bitcoinj.base.Network;
|
||||
import org.bitcoinj.base.Sha256Hash;
|
||||
import org.bitcoinj.base.utils.ByteUtils;
|
||||
import org.bitcoinj.core.TransactionOutput;
|
||||
@ -31,7 +32,6 @@ import org.bitcoinj.store.*;
|
||||
import org.bitcoinj.uri.BitcoinURI;
|
||||
import org.bitcoinj.uri.BitcoinURIParseException;
|
||||
import org.bitcoinj.utils.BriefLogFormatter;
|
||||
import org.bitcoinj.utils.Network;
|
||||
import org.bitcoinj.wallet.CoinSelection;
|
||||
import org.bitcoinj.wallet.CoinSelector;
|
||||
import org.bitcoinj.wallet.DeterministicKeyChain;
|
||||
|
Loading…
Reference in New Issue
Block a user