Browse Source

Get rid of deprecation entirely which allows current code to run past block height 5555555

pull/384/head
Duke 5 months ago
parent
commit
20fdc0e4fe
  1. 2
      src/Makefile.am
  2. 4
      src/main.cpp
  3. 29
      src/rpc/net.cpp
  4. 1
      src/rpc/rawtransaction.cpp
  5. 1
      src/rpc/server.cpp
  6. 1
      src/rpc/server.h

2
src/Makefile.am

@ -165,7 +165,6 @@ BITCOIN_CORE_H = \
consensus/validation.h \
core_io.h \
core_memusage.h \
deprecation.h \
fs.h \
hash.h \
httprpc.h \
@ -300,7 +299,6 @@ libbitcoin_server_a_SOURCES = \
fs.cpp \
crosschain.cpp \
crosschain_authority.cpp \
deprecation.cpp \
httprpc.cpp \
httpserver.cpp \
i2p.cpp \

4
src/main.cpp

@ -27,7 +27,6 @@
#include "checkqueue.h"
#include "consensus/upgrades.h"
#include "consensus/validation.h"
#include "deprecation.h"
#include "init.h"
#include "merkleblock.h"
#include "metrics.h"
@ -4030,8 +4029,6 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
recentlyConflictedTxs.insert(std::make_pair(pindexNew, txConflicted));
nRecentlyConflictedSequence += 1;
EnforceNodeDeprecation(pindexNew->GetHeight());
int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;
LogPrint("bench", " - Connect postprocess: %.2fms [%.2fs]\n", (nTime6 - nTime5) * 0.001, nTimePostConnect * 0.000001);
LogPrint("bench", "- Connect block: %.2fms [%.2fs]\n", (nTime6 - nTime1) * 0.001, nTimeTotal * 0.000001);
@ -5995,7 +5992,6 @@ bool static LoadBlockIndexDB()
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.LastTip()->GetBlockTime()),
progress);
EnforceNodeDeprecation(chainActive.Height(), true);
CBlockIndex *pindex;
if ( (pindex= chainActive.LastTip()) != 0 )
{

29
src/rpc/net.cpp

@ -27,7 +27,6 @@
#include "timedata.h"
#include "util.h"
#include "version.h"
#include "deprecation.h"
#include "hush/utiltls.h"
#include <boost/foreach.hpp>
#include <univalue.h>
@ -495,33 +494,6 @@ static UniValue GetNetworksInfo()
return networks;
}
UniValue getdeprecationinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
{
const CChainParams& chainparams = Params();
if (fHelp || params.size() != 0 || chainparams.NetworkIDString() != "main")
throw runtime_error(
"getdeprecationinfo\n"
"Returns an object containing current version and deprecation block height. Applicable only on mainnet.\n"
"\nResult:\n"
"{\n"
" \"version\": xxxxx, (numeric) the server version\n"
" \"subversion\": \"/GoldenSandtrout:x.y.z[-v]/\", (string) the server subversion string\n"
" \"deprecationheight\": xxxxx, (numeric) the block height at which this version will deprecate and shut down\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getdeprecationinfo", "")
+ HelpExampleRpc("getdeprecationinfo", "")
);
UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("version", CLIENT_VERSION));
obj.push_back(Pair("subversion",
FormatSubVersion(GetArg("-clientname","GoldenSandtrout"), CLIENT_VERSION, std::vector<string>())));
obj.push_back(Pair("deprecationheight", DEPRECATION_HEIGHT));
return obj;
}
UniValue getnetworkinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
{
if (fHelp || params.size() != 0)
@ -710,7 +682,6 @@ static const CRPCCommand commands[] =
{ // category name actor (function) okSafeMode
// --------------------- ------------------------ ----------------------- ----------
{ "network", "getconnectioncount", &getconnectioncount, true },
{ "network", "getdeprecationinfo", &getdeprecationinfo, true },
{ "network", "ping", &ping, true },
{ "network", "getpeerlist", &getpeerlist, true },
{ "network", "getpeerinfo", &getpeerinfo, true },

1
src/rpc/rawtransaction.cpp

@ -21,7 +21,6 @@
#include "consensus/validation.h"
#include "core_io.h"
#include "init.h"
#include "deprecation.h"
#include "key_io.h"
#include "keystore.h"
#include "main.h"

1
src/rpc/server.cpp

@ -299,7 +299,6 @@ static const CRPCCommand vRPCCommands[] =
/* P2P networking */
{ "network", "getnetworkinfo", &getnetworkinfo, true },
{ "network", "getdeprecationinfo", &getdeprecationinfo, true },
{ "network", "addnode", &addnode, true },
{ "network", "disconnectnode", &disconnectnode, true },
{ "network", "getaddednodeinfo", &getaddednodeinfo, true },

1
src/rpc/server.h

@ -391,7 +391,6 @@ extern UniValue setstakingsplit(const UniValue& params, bool fHelp, const CPubKe
extern UniValue getwalletinfo(const UniValue& params, bool fHelp, const CPubKey& mypk);
extern UniValue getblockchaininfo(const UniValue& params, bool fHelp, const CPubKey& mypk);
extern UniValue getnetworkinfo(const UniValue& params, bool fHelp, const CPubKey& mypk);
extern UniValue getdeprecationinfo(const UniValue& params, bool fHelp, const CPubKey& mypk);
extern UniValue setmocktime(const UniValue& params, bool fHelp, const CPubKey& mypk);
extern UniValue resendwallettransactions(const UniValue& params, bool fHelp, const CPubKey& mypk);

Loading…
Cancel
Save