Skip to content
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

Add preliminary testing option for block v11 height on testnet #1706

Merged
merged 1 commit into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,8 @@ bool AppInit2(ThreadHandlerPtr threads)
std::string sha256_algo = SHA256AutoDetect();
LogPrintf("Using the '%s' SHA256 implementation\n", sha256_algo);

LogPrintf("Block version 11 hard fork configured for block %d", GetV11Threshold());

fs::path datadir = GetDataDir();
fs::path walletFileName = GetArg("-wallet", "wallet.dat");

Expand Down
13 changes: 10 additions & 3 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,16 @@ inline bool IsV10Enabled(int nHeight)
inline int32_t GetV11Threshold()
{
// Returns "never" before planned intro of bv11.
return fTestNet
? std::numeric_limits<int32_t>::max()
: std::numeric_limits<int32_t>::max();
try {
return fTestNet
// Temporary: configure testnet v11 height via parameter before
// releasing v11 to regular testnet:
//
? std::stoi(GetArg("-v11height", ""))
: std::numeric_limits<int32_t>::max();
} catch (...) {
return std::numeric_limits<int32_t>::max();
}
}

inline bool IsV11Enabled(int nHeight)
Expand Down