Changeset View
Changeset View
Standalone View
Standalone View
contrib/devtools/chainparams/generate_chainparams_constants.py
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | def main(): | ||||
print('''\ | print('''\ | ||||
#ifndef BITCOIN_CHAINPARAMSCONSTANTS_H | #ifndef BITCOIN_CHAINPARAMSCONSTANTS_H | ||||
#define BITCOIN_CHAINPARAMSCONSTANTS_H | #define BITCOIN_CHAINPARAMSCONSTANTS_H | ||||
/** | /** | ||||
* Chain params constants for each tracked chain. | * Chain params constants for each tracked chain. | ||||
* @{} by contrib/devtools/chainparams/generate_chainparams_constants.py | * @{} by contrib/devtools/chainparams/generate_chainparams_constants.py | ||||
*/ | */ | ||||
#include <uint256.h> | #include <primitives/blockhash.h> | ||||
Fabien: Keep for chainwork | |||||
deadalnixAuthorUnsubmitted Done Inline ActionsGood catch. deadalnix: Good catch. | |||||
namespace ChainParamsConstants {{ | namespace ChainParamsConstants {{ | ||||
const uint256 MAINNET_DEFAULT_ASSUME_VALID = uint256S("{}"); | const BlockHash MAINNET_DEFAULT_ASSUME_VALID = BlockHash::fromHex("{}"); | ||||
const uint256 MAINNET_MINIMUM_CHAIN_WORK = uint256S("{}"); | const BlockHash MAINNET_MINIMUM_CHAIN_WORK = BlockHash::fromHex("{}"); | ||||
FabienUnsubmitted Not Done Inline ActionsChainwork is not a block hash Fabien: Chainwork is not a block hash | |||||
deadalnixAuthorUnsubmitted Done Inline ActionsYou are correct deadalnix: You are correct | |||||
const uint256 TESTNET_DEFAULT_ASSUME_VALID = uint256S("{}"); | const BlockHash TESTNET_DEFAULT_ASSUME_VALID = BlockHash::fromHex("{}"); | ||||
const uint256 TESTNET_MINIMUM_CHAIN_WORK = uint256S("{}"); | const BlockHash TESTNET_MINIMUM_CHAIN_WORK = BlockHash::fromHex("{}"); | ||||
FabienUnsubmitted Not Done Inline ActionsDito Fabien: Dito | |||||
}} // namespace ChainParamsConstants | }} // namespace ChainParamsConstants | ||||
#endif // BITCOIN_CHAINPARAMSCONSTANTS_H\ | #endif // BITCOIN_CHAINPARAMSCONSTANTS_H\ | ||||
'''.format( | '''.format( | ||||
# 'generated' is split out so this file is not identified as generated. | # 'generated' is split out so this file is not identified as generated. | ||||
"generated", | "generated", | ||||
*process_constants(indir, 'chainparams_main.txt'), | *process_constants(indir, 'chainparams_main.txt'), | ||||
*process_constants(indir, 'chainparams_test.txt')) | *process_constants(indir, 'chainparams_test.txt')) | ||||
) | ) | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
main() | main() |
Keep for chainwork