From d3df40e51a29bd98830043dd19829126390d1bc4 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 23 Apr 2016 23:30:20 +0000 Subject: Implement BIP 9 GBT changes - BIP9DeploymentInfo struct for static deployment info - VersionBitsDeploymentInfo: Avoid C++11ism by commenting parameter names - getblocktemplate: Make sure to set deployments in the version if it is LOCKED_IN - In this commit, all rules are considered required for clients to support --- src/versionbits.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/versionbits.cpp') diff --git a/src/versionbits.cpp b/src/versionbits.cpp index fbb60c0fc5..041ca2adbc 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -4,6 +4,17 @@ #include "versionbits.h" +#include "consensus/params.h" + +const struct BIP9DeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS] = { + { + /*.name =*/ "testdummy", + }, + { + /*.name =*/ "csv", + } +}; + ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const { int nPeriod = Period(params); -- cgit v1.2.3 From 98790608a43e60b8025346034d28ff1f58cebab0 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 1 Jun 2016 16:47:36 +0000 Subject: getblocktemplate: Explicitly handle the distinction between GBT-affecting softforks vs not --- src/versionbits.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/versionbits.cpp') diff --git a/src/versionbits.cpp b/src/versionbits.cpp index 041ca2adbc..c06c9907be 100644 --- a/src/versionbits.cpp +++ b/src/versionbits.cpp @@ -9,9 +9,11 @@ const struct BIP9DeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS] = { { /*.name =*/ "testdummy", + /*.gbt_force =*/ true, }, { /*.name =*/ "csv", + /*.gbt_force =*/ true, } }; -- cgit v1.2.3