chainparams.h raw

   1  // Copyright (c) 2009-2010 Satoshi Nakamoto
   2  // Copyright (c) 2009-present The Bitcoin Core developers
   3  // Distributed under the MIT software license, see the accompanying
   4  // file COPYING or http://www.opensource.org/licenses/mit-license.php.
   5  
   6  #ifndef BITCOIN_CHAINPARAMS_H
   7  #define BITCOIN_CHAINPARAMS_H
   8  
   9  #include <kernel/chainparams.h> // IWYU pragma: export
  10  
  11  #include <memory>
  12  
  13  class ArgsManager;
  14  
  15  /**
  16   * Creates and returns a std::unique_ptr<CChainParams> of the chosen chain.
  17   */
  18  std::unique_ptr<const CChainParams> CreateChainParams(const ArgsManager& args, ChainType chain);
  19  
  20  /**
  21   * Return the currently selected parameters. This won't change after app
  22   * startup, except for unit tests.
  23   */
  24  const CChainParams &Params();
  25  
  26  /**
  27   * Sets the params returned by Params() to those for the given chain type.
  28   */
  29  void SelectParams(ChainType chain);
  30  
  31  #endif // BITCOIN_CHAINPARAMS_H
  32