New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InitialBlockDownload upstream changes #3263
Changes from all commits
29aaf13
02eedee
e41632c
f04a90a
bbff863
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,9 @@ class CMainParams : public CChainParams { | |
consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = | ||
Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; | ||
|
||
// The best chain should have at least this much work. | ||
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000281b32ff3198a1"); | ||
|
||
/** | ||
* The message start string should be awesome! ⓩ❤ | ||
*/ | ||
|
@@ -115,7 +118,6 @@ class CMainParams : public CChainParams { | |
pchMessageStart[3] = 0x64; | ||
vAlertPubKey = ParseHex("04b7ecf0baa90495ceb4e4090f6b2fd37eec1e9c85fac68a487f3ce11589692e4a317479316ee814e066638e1db54e37a10689b70286e6315b1087b6615d179264"); | ||
nDefaultPort = 8233; | ||
nMaxTipAge = 24 * 60 * 60; | ||
nPruneAfterHeight = 100000; | ||
const size_t N = 200, K = 9; | ||
BOOST_STATIC_ASSERT(equihash_parameters_acceptable(N, K)); | ||
|
@@ -269,13 +271,15 @@ class CTestNetParams : public CChainParams { | |
consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = | ||
Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; | ||
|
||
// The best chain should have at least this much work. | ||
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000000001d0c4d9cd"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @str4d Double checking - you retrieved this via getblockchaininfo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I verified that testnet as more work than this. |
||
|
||
pchMessageStart[0] = 0xfa; | ||
pchMessageStart[1] = 0x1a; | ||
pchMessageStart[2] = 0xf9; | ||
pchMessageStart[3] = 0xbf; | ||
vAlertPubKey = ParseHex("044e7a1553392325c871c5ace5d6ad73501c66f4c185d6b0453cf45dec5a1322e705c672ac1a27ef7cdaf588c10effdf50ed5f95f85f2f54a5f6159fca394ed0c6"); | ||
nDefaultPort = 18233; | ||
nMaxTipAge = 24 * 60 * 60; | ||
nPruneAfterHeight = 1000; | ||
const size_t N = 200, K = 9; | ||
BOOST_STATIC_ASSERT(equihash_parameters_acceptable(N, K)); | ||
|
@@ -319,6 +323,7 @@ class CTestNetParams : public CChainParams { | |
fMineBlocksOnDemand = false; | ||
fTestnetToBeDeprecatedFieldRPC = true; | ||
|
||
|
||
checkpointData = (CCheckpointData) { | ||
boost::assign::map_list_of | ||
(0, consensus.hashGenesisBlock) | ||
|
@@ -382,12 +387,14 @@ class CRegTestParams : public CChainParams { | |
consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = | ||
Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; | ||
|
||
// The best chain should have at least this much work. | ||
consensus.nMinimumChainWork = uint256S("0x00"); | ||
|
||
pchMessageStart[0] = 0xaa; | ||
pchMessageStart[1] = 0xe8; | ||
pchMessageStart[2] = 0x3f; | ||
pchMessageStart[3] = 0x5f; | ||
nDefaultPort = 18344; | ||
nMaxTipAge = 24 * 60 * 60; | ||
nPruneAfterHeight = 1000; | ||
const size_t N = 48, K = 5; | ||
BOOST_STATIC_ASSERT(equihash_parameters_acceptable(N, K)); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -472,6 +472,7 @@ std::string HelpMessage(HelpMessageMode mode) | |
strUsage += HelpMessageOpt("-limitfreerelay=<n>", strprintf("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default: %u)", 15)); | ||
strUsage += HelpMessageOpt("-relaypriority", strprintf("Require high priority for relaying free or low-fee transactions (default: %u)", 0)); | ||
strUsage += HelpMessageOpt("-maxsigcachesize=<n>", strprintf("Limit size of signature cache to <n> entries (default: %u)", 50000)); | ||
strUsage += HelpMessageOpt("-maxtipage=<n>", strprintf("Maximum tip age in seconds to consider node in initial block download (default: %u)", DEFAULT_MAX_TIP_AGE)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will enable testnet users to configure their nodes to allow mining (if the testnet ever happens to get to a point where the last block was mined beyond the default) without needing to modify the source code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, useful and related to #1609 |
||
} | ||
strUsage += HelpMessageOpt("-minrelaytxfee=<amt>", strprintf(_("Fees (in %s/kB) smaller than this are considered zero fee for relaying (default: %s)"), | ||
CURRENCY_UNIT, FormatMoney(::minRelayTxFee.GetFeePerK()))); | ||
|
@@ -1077,6 +1078,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) | |
if (GetBoolArg("-peerbloomfilters", true)) | ||
nLocalServices |= NODE_BLOOM; | ||
|
||
nMaxTipAge = GetArg("-maxtipage", DEFAULT_MAX_TIP_AGE); | ||
|
||
#ifdef ENABLE_MINING | ||
if (mapArgs.count("-mineraddress")) { | ||
CTxDestination addr = DecodeDestination(mapArgs["-mineraddress"]); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@str4d Double checking - you retrieved this via getblockchaininfo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified that mainnet has more work than this.