Class TestNet3Params


public class TestNet3Params extends BitcoinNetworkParams
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.
  • Field Details

    • TESTNET_MAJORITY_WINDOW

      public static final int TESTNET_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

    • TestNet3Params

      public TestNet3Params()
  • Method Details

    • 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 class NetworkParameters
      Returns:
      genesis block
    • 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 class BitcoinNetworkParams
      Parameters:
      storedPrev - previous stored block
      nextBlock - proposed block
      blockStore - active BlockStore
      Throws:
      VerificationException - if the block's difficulty is not correct.
      BlockStoreException - if an error occurred accessing the BlockStore