Enable experimental feature -developersetpoolsizezero on mainnet.
This commit is contained in:
parent
fc79a848fb
commit
867786d777
14
src/main.cpp
14
src/main.cpp
|
@ -3451,17 +3451,12 @@ void FallbackSproutValuePoolBalance(
|
||||||
const CChainParams& chainparams
|
const CChainParams& chainparams
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// We might not want to enable the checkpointing for mainnet
|
|
||||||
// yet.
|
|
||||||
if (!chainparams.ZIP209Enabled()) {
|
if (!chainparams.ZIP209Enabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// When developer option -developersetpoolsizezero is enabled, we don't need a fallback balance.
|
// When developer option -developersetpoolsizezero is enabled, we don't need a fallback balance.
|
||||||
if ((chainparams.NetworkIDString() == "test" || chainparams.NetworkIDString() == "regtest") &&
|
if (fExperimentalMode && mapArgs.count("-developersetpoolsizezero")) {
|
||||||
fExperimentalMode &&
|
|
||||||
mapArgs.count("-developersetpoolsizezero"))
|
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4252,13 +4247,10 @@ bool static LoadBlockIndexDB()
|
||||||
// Fall back to hardcoded Sprout value pool balance
|
// Fall back to hardcoded Sprout value pool balance
|
||||||
FallbackSproutValuePoolBalance(pindex, chainparams);
|
FallbackSproutValuePoolBalance(pindex, chainparams);
|
||||||
|
|
||||||
// If developer option -developersetpoolsizezero has been enabled on testnet or in regtest mode,
|
// If developer option -developersetpoolsizezero has been enabled,
|
||||||
// override and set the in-memory size of shielded pools to zero. An unshielding transaction
|
// override and set the in-memory size of shielded pools to zero. An unshielding transaction
|
||||||
// can then be used to trigger and test the handling of turnstile violations.
|
// can then be used to trigger and test the handling of turnstile violations.
|
||||||
if ((chainparams.NetworkIDString() == "test" || chainparams.NetworkIDString() == "regtest") &&
|
if (fExperimentalMode && mapArgs.count("-developersetpoolsizezero")) {
|
||||||
fExperimentalMode &&
|
|
||||||
mapArgs.count("-developersetpoolsizezero"))
|
|
||||||
{
|
|
||||||
pindex->nChainSproutValue = 0;
|
pindex->nChainSproutValue = 0;
|
||||||
pindex->nChainSaplingValue = 0;
|
pindex->nChainSaplingValue = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue