@@ -598,7 +598,6 @@ static RPCHelpMan getblocktemplate()
598
598
std::string strMode = " template" ;
599
599
UniValue lpval = NullUniValue;
600
600
std::set<std::string> setClientRules;
601
- int64_t nMaxVersionPreVB = -1 ;
602
601
CChainState& active_chainstate = chainman.ActiveChainstate ();
603
602
CChain& active_chain = active_chainstate.m_chain ;
604
603
if (!request.params [0 ].isNull ())
@@ -650,12 +649,6 @@ static RPCHelpMan getblocktemplate()
650
649
const UniValue& v = aClientRules[i];
651
650
setClientRules.insert (v.get_str ());
652
651
}
653
- } else {
654
- // NOTE: It is important that this NOT be read if versionbits is supported
655
- const UniValue& uvMaxVersion = find_value (oparam, " maxversion" );
656
- if (uvMaxVersion.isNum ()) {
657
- nMaxVersionPreVB = uvMaxVersion.getInt <int64_t >();
658
- }
659
652
}
660
653
}
661
654
@@ -863,7 +856,6 @@ static RPCHelpMan getblocktemplate()
863
856
if (setClientRules.find (vbinfo.name ) == setClientRules.end ()) {
864
857
// Not supported by the client; make sure it's safe to proceed
865
858
if (!vbinfo.gbt_force ) {
866
- // If we do anything other than throw an exception here, be sure version/force isn't sent to old clients
867
859
throw JSONRPCError (RPC_INVALID_PARAMETER, strprintf (" Support for '%s' rule requires explicit client support" , vbinfo.name ));
868
860
}
869
861
}
@@ -876,14 +868,6 @@ static RPCHelpMan getblocktemplate()
876
868
result.pushKV (" vbavailable" , vbavailable);
877
869
result.pushKV (" vbrequired" , int (0 ));
878
870
879
- if (nMaxVersionPreVB >= 2 ) {
880
- // If VB is supported by the client, nMaxVersionPreVB is -1, so we won't get here
881
- // Because BIP 34 changed how the generation transaction is serialized, we can only use version/force back to v2 blocks
882
- // This is safe to do [otherwise-]unconditionally only because we are throwing an exception above if a non-force deployment gets activated
883
- // Note that this can probably also be removed entirely after the first BIP9 non-force deployment (ie, probably segwit) gets activated
884
- aMutable.push_back (" version/force" );
885
- }
886
-
887
871
result.pushKV (" previousblockhash" , pblock->hashPrevBlock .GetHex ());
888
872
result.pushKV (" transactions" , transactions);
889
873
result.pushKV (" coinbaseaux" , aux);
0 commit comments