diff --git a/core/src/main/java/com/google/bitcoin/core/NetworkParameters.java b/core/src/main/java/com/google/bitcoin/core/NetworkParameters.java index 94dbe8fa2..3499c938d 100644 --- a/core/src/main/java/com/google/bitcoin/core/NetworkParameters.java +++ b/core/src/main/java/com/google/bitcoin/core/NetworkParameters.java @@ -52,8 +52,6 @@ public abstract class NetworkParameters implements Serializable { */ public static final byte[] SATOSHI_KEY = Hex.decode("04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284"); - /** The string returned by getId() for the main, production network where people trade things. */ - public static final String ID_PRODNET = "org.bitcoin.production"; /** The string returned by getId() for the main, production network where people trade things. */ public static final String ID_MAINNET = "org.bitcoin.production"; /** The string returned by getId() for the testnet. */ @@ -134,26 +132,31 @@ public abstract class NetworkParameters implements Serializable { public static final BigInteger MAX_MONEY = new BigInteger("21000000", 10).multiply(COIN); /** Alias for TestNet3Params.get(), use that instead. */ + @Deprecated public static NetworkParameters testNet() { return TestNet3Params.get(); } /** Alias for TestNet2Params.get(), use that instead. */ + @Deprecated public static NetworkParameters testNet2() { return TestNet2Params.get(); } /** Alias for TestNet3Params.get(), use that instead. */ + @Deprecated public static NetworkParameters testNet3() { return TestNet3Params.get(); } /** Alias for MainNetParams.get(), use that instead */ + @Deprecated public static NetworkParameters prodNet() { return MainNetParams.get(); } /** Returns a testnet params modified to allow any difficulty target. */ + @Deprecated public static NetworkParameters unitTests() { return UnitTestParams.get(); } diff --git a/core/src/main/java/com/google/bitcoin/core/Wallet.java b/core/src/main/java/com/google/bitcoin/core/Wallet.java index 8ab097b34..b702bed04 100644 --- a/core/src/main/java/com/google/bitcoin/core/Wallet.java +++ b/core/src/main/java/com/google/bitcoin/core/Wallet.java @@ -1070,6 +1070,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi if (result == TransactionInput.ConnectionResult.ALREADY_SPENT) { if (fromChain) { // Double spend from chain: this will be handled later by checkForDoubleSpendAgainstPending. + log.warn("updateForSpends: saw double spend from chain, handling later."); } else { // We saw two pending transactions that double spend each other. We don't know which will win. // This should not happen. @@ -1082,6 +1083,7 @@ public class Wallet implements Serializable, BlockChainListener, PeerFilterProvi // The outputs are already marked as spent by the connect call above, so check if there are any more for // us to use. Move if not. Transaction connected = checkNotNull(input.getOutpoint().fromTx); + log.info(" marked {} as spent", input.getOutpoint()); maybeMovePool(connected, "prevtx"); } } diff --git a/core/src/main/java/com/google/bitcoin/params/MainNetParams.java b/core/src/main/java/com/google/bitcoin/params/MainNetParams.java index 3b84b02bf..1c9961862 100644 --- a/core/src/main/java/com/google/bitcoin/params/MainNetParams.java +++ b/core/src/main/java/com/google/bitcoin/params/MainNetParams.java @@ -39,7 +39,7 @@ public class MainNetParams extends NetworkParameters { genesisBlock.setDifficultyTarget(0x1d00ffffL); genesisBlock.setTime(1231006505L); genesisBlock.setNonce(2083236893); - id = ID_PRODNET; + id = ID_MAINNET; subsidyDecreaseBlockCount = 210000; spendableCoinbaseDepth = 100; String genesisHash = genesisBlock.getHashAsString();