aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-05-19 08:54:18 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-05-19 08:54:23 -0400
commitaa8d76806c74a51ec66e5004394fe9ea8ff0fac4 (patch)
tree9afeac6a8a6fa890e109b855e9db6f4869c01f81 /src
parentd44dd513226ff8c45d25425d1b689cdceb7282ea (diff)
parent412d5fe8791c417bf46fc55a5bb8d59be98a33db (diff)
Merge #17946: Fix GBT: Restore "!segwit" and "csv" to "rules" key
412d5fe8791c417bf46fc55a5bb8d59be98a33db QA: feature_segwit: Check that template "rules" includes "!segwit" as appropriate (Luke Dashjr) 2abe8cc3b760219cfa434e4c96e9f8d3611d0037 Bugfix: Include "csv","!segwit" in "rules" (Luke Dashjr) Pull request description: #16060 removed CSV & segwit from versionbits, breaking the "rules" key returned by GBT. Without this, miners don't know they're mining segwit blocks, and should fall back to pre-segwit block creation. ACKs for top commit: sipa: ACK 412d5fe8791c417bf46fc55a5bb8d59be98a33db jnewbery: Tested ACK 412d5fe8791c417bf46fc55a5bb8d59be98a33db. Tree-SHA512: 825d72e257dc0dd4941f2fe498d8d4f4f2a21b9505cd21a8f9eb7fb5d6d7dd9219347928cf90bb57a777920ce24295859763e64fa8a22ebb58fc2380f80f5615
Diffstat (limited to 'src')
-rw-r--r--src/rpc/mining.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index 8e752e5e83..59ab80bcd5 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -787,6 +787,8 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
result.pushKV("capabilities", aCaps);
UniValue aRules(UniValue::VARR);
+ aRules.push_back("csv");
+ if (!fPreSegWit) aRules.push_back("!segwit");
UniValue vbavailable(UniValue::VOBJ);
for (int j = 0; j < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++j) {
Consensus::DeploymentPos pos = Consensus::DeploymentPos(j);