Package org.bitcoinj.params
Class UnitTestParams
java.lang.Object
org.bitcoinj.core.NetworkParameters
org.bitcoinj.params.BitcoinNetworkParams
org.bitcoinj.params.UnitTestParams
Network parameters used by the bitcoinj unit tests (and potentially your own). This lets you solve a block using
Block.solve()
by setting difficulty to the easiest possible.-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
Fields inherited from class org.bitcoinj.params.BitcoinNetworkParams
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, id, interval, INTERVAL, majorityEnforceBlockUpgrade, majorityRejectBlockOutdated, majorityWindow, MAX_COINS, MAX_MONEY, maxTarget, network, p2shHeader, packetMagic, PAYMENT_PROTOCOL_ID_MAINNET, PAYMENT_PROTOCOL_ID_REGTEST, PAYMENT_PROTOCOL_ID_SIGNET, PAYMENT_PROTOCOL_ID_TESTNET, PAYMENT_PROTOCOL_ID_UNIT_TESTS, port, segwitAddressHrp, spendableCoinbaseDepth, subsidyDecreaseBlockCount, TARGET_SPACING, TARGET_TIMESPAN, targetTimespan
-
Constructor Summary
-
Method Summary
Methods inherited from class org.bitcoinj.params.BitcoinNetworkParams
checkDifficultyTransitions, fromID, getBlockInflation, getMaxMoney, getMonetaryFormat, getPaymentProtocolId, getSerializer, getUriScheme, hasMaxMoney, isDifficultyTransitionPoint, isRewardHalvingPoint, of
Methods inherited from class org.bitcoinj.core.NetworkParameters
allowEmptyPeerChain, equals, fromAddress, fromPmtProtocolID, getAddressHeader, getAddrSeeds, getBip32HeaderP2PKHpriv, getBip32HeaderP2PKHpub, getBip32HeaderP2WPKHpriv, getBip32HeaderP2WPKHpub, getBlockVerificationFlags, getDefaultSerializer, getDnsSeeds, getDumpedPrivateKeyHeader, getId, getInterval, getMajorityEnforceBlockUpgrade, getMajorityRejectBlockOutdated, getMajorityWindow, getMaxTarget, getP2SHHeader, getPacketMagic, getPort, getProtocolVersionNum, getSegwitAddressHrp, getSpendableCoinbaseDepth, getSubsidyDecreaseBlockCount, getTargetTimespan, getTransactionVerificationFlags, hashCode, isCheckpoint, network, of, passesCheckpoint
-
Field Details
-
UNITNET_MAJORITY_WINDOW
public static final int UNITNET_MAJORITY_WINDOW- See Also:
-
TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED
public static final int TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED- See Also:
-
TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
public static final int TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE- See Also:
-
-
Constructor Details
-
UnitTestParams
public UnitTestParams()
-
-
Method Details
-
get
-
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
- Returns:
- genesis block
-