Package org.bitcoinj.params
Class TestNet3Params
- java.lang.Object
-
- org.bitcoinj.core.NetworkParameters
-
- org.bitcoinj.params.AbstractBitcoinNetParams
-
- org.bitcoinj.params.TestNet3Params
-
public class TestNet3Params extends AbstractBitcoinNetParams
Parameters for the testnet, a separate public instance of Bitcoin that has relaxed rules suitable for development and testing of applications and new Bitcoin versions.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bitcoinj.core.NetworkParameters
NetworkParameters.ProtocolVersion
-
-
Field Summary
Fields Modifier and Type Field Description static int
TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
static int
TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED
static int
TESTNET_MAJORITY_WINDOW
-
Fields inherited from class org.bitcoinj.params.AbstractBitcoinNetParams
BITCOIN_SCHEME, genesisBlock, REWARD_HALVING_INTERVAL
-
Fields inherited from class org.bitcoinj.core.NetworkParameters
addressHeader, addrSeeds, BIP16_ENFORCE_TIME, bip32HeaderP2PKHpriv, bip32HeaderP2PKHpub, bip32HeaderP2WPKHpriv, bip32HeaderP2WPKHpub, checkpoints, defaultSerializer, dnsSeeds, dumpedPrivateKeyHeader, httpSeeds, id, ID_MAINNET, ID_REGTEST, ID_TESTNET, ID_UNITTESTNET, interval, INTERVAL, majorityEnforceBlockUpgrade, majorityRejectBlockOutdated, majorityWindow, MAX_COINS, MAX_MONEY, maxTarget, p2shHeader, packetMagic, PAYMENT_PROTOCOL_ID_MAINNET, PAYMENT_PROTOCOL_ID_REGTEST, PAYMENT_PROTOCOL_ID_TESTNET, PAYMENT_PROTOCOL_ID_UNIT_TESTS, port, segwitAddressHrp, spendableCoinbaseDepth, subsidyDecreaseBlockCount, TARGET_SPACING, TARGET_TIMESPAN, targetTimespan
-
-
Constructor Summary
Constructors Constructor Description TestNet3Params()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkDifficultyTransitions(StoredBlock storedPrev, Block nextBlock, BlockStore blockStore)
Throws an exception if the block's difficulty is not correct.static TestNet3Params
get()
Block
getGenesisBlock()
Genesis block for this chain.java.lang.String
getPaymentProtocolId()
-
Methods inherited from class org.bitcoinj.params.AbstractBitcoinNetParams
getBlockInflation, getMaxMoney, getMinNonDustOutput, getMonetaryFormat, getProtocolVersionNum, getSerializer, getUriScheme, hasMaxMoney, isDifficultyTransitionPoint, isRewardHalvingPoint
-
Methods inherited from class org.bitcoinj.core.NetworkParameters
allowEmptyPeerChain, equals, fromID, fromPmtProtocolID, getAddressHeader, getAddrSeeds, getBip32HeaderP2PKHpriv, getBip32HeaderP2PKHpub, getBip32HeaderP2WPKHpriv, getBip32HeaderP2WPKHpub, getBlockVerificationFlags, getDefaultSerializer, getDnsSeeds, getDumpedPrivateKeyHeader, getHttpSeeds, getId, getInterval, getMajorityEnforceBlockUpgrade, getMajorityRejectBlockOutdated, getMajorityWindow, getMaxTarget, getP2SHHeader, getPacketMagic, getPort, getSegwitAddressHrp, getSpendableCoinbaseDepth, getSubsidyDecreaseBlockCount, getTargetTimespan, getTransactionVerificationFlags, hashCode, isCheckpoint, passesCheckpoint
-
-
-
-
Field Detail
-
TESTNET_MAJORITY_WINDOW
public static final int TESTNET_MAJORITY_WINDOW
- See Also:
- Constant Field Values
-
TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED
public static final int TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED
- See Also:
- Constant Field Values
-
TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
public static final int TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static TestNet3Params get()
-
getGenesisBlock
public Block getGenesisBlock()
Description copied from class:NetworkParameters
Genesis block for this chain.
The first block in every chain is a well known constant shared between all Bitcoin implementations. For a block to be valid, it must be eventually possible to work backwards to the genesis block by following the prevBlockHash pointers in the block headers.
The genesis blocks for both test and main networks contain the timestamp of when they were created, and a message in the coinbase transaction. It says, "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks".
- Specified by:
getGenesisBlock
in classNetworkParameters
-
getPaymentProtocolId
public java.lang.String getPaymentProtocolId()
- Specified by:
getPaymentProtocolId
in classNetworkParameters
-
checkDifficultyTransitions
public void checkDifficultyTransitions(StoredBlock storedPrev, Block nextBlock, BlockStore blockStore) throws VerificationException, BlockStoreException
Description copied from class:NetworkParameters
Throws an exception if the block's difficulty is not correct.- Overrides:
checkDifficultyTransitions
in classAbstractBitcoinNetParams
- Throws:
VerificationException
- if the block's difficulty is not correct.BlockStoreException
-
-