Get rid of deprecation entirely which allows current code to run past block height 5555555
This commit is contained in:
@@ -165,7 +165,6 @@ BITCOIN_CORE_H = \
|
|||||||
consensus/validation.h \
|
consensus/validation.h \
|
||||||
core_io.h \
|
core_io.h \
|
||||||
core_memusage.h \
|
core_memusage.h \
|
||||||
deprecation.h \
|
|
||||||
fs.h \
|
fs.h \
|
||||||
hash.h \
|
hash.h \
|
||||||
httprpc.h \
|
httprpc.h \
|
||||||
@@ -300,7 +299,6 @@ libbitcoin_server_a_SOURCES = \
|
|||||||
fs.cpp \
|
fs.cpp \
|
||||||
crosschain.cpp \
|
crosschain.cpp \
|
||||||
crosschain_authority.cpp \
|
crosschain_authority.cpp \
|
||||||
deprecation.cpp \
|
|
||||||
httprpc.cpp \
|
httprpc.cpp \
|
||||||
httpserver.cpp \
|
httpserver.cpp \
|
||||||
i2p.cpp \
|
i2p.cpp \
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include "checkqueue.h"
|
#include "checkqueue.h"
|
||||||
#include "consensus/upgrades.h"
|
#include "consensus/upgrades.h"
|
||||||
#include "consensus/validation.h"
|
#include "consensus/validation.h"
|
||||||
#include "deprecation.h"
|
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "merkleblock.h"
|
#include "merkleblock.h"
|
||||||
#include "metrics.h"
|
#include "metrics.h"
|
||||||
@@ -4030,8 +4029,6 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
|
|||||||
recentlyConflictedTxs.insert(std::make_pair(pindexNew, txConflicted));
|
recentlyConflictedTxs.insert(std::make_pair(pindexNew, txConflicted));
|
||||||
nRecentlyConflictedSequence += 1;
|
nRecentlyConflictedSequence += 1;
|
||||||
|
|
||||||
EnforceNodeDeprecation(pindexNew->GetHeight());
|
|
||||||
|
|
||||||
int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;
|
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 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);
|
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()),
|
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.LastTip()->GetBlockTime()),
|
||||||
progress);
|
progress);
|
||||||
|
|
||||||
EnforceNodeDeprecation(chainActive.Height(), true);
|
|
||||||
CBlockIndex *pindex;
|
CBlockIndex *pindex;
|
||||||
if ( (pindex= chainActive.LastTip()) != 0 )
|
if ( (pindex= chainActive.LastTip()) != 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include "timedata.h"
|
#include "timedata.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "deprecation.h"
|
|
||||||
#include "hush/utiltls.h"
|
#include "hush/utiltls.h"
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <univalue.h>
|
#include <univalue.h>
|
||||||
@@ -495,33 +494,6 @@ static UniValue GetNetworksInfo()
|
|||||||
return networks;
|
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)
|
UniValue getnetworkinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||||
{
|
{
|
||||||
if (fHelp || params.size() != 0)
|
if (fHelp || params.size() != 0)
|
||||||
@@ -710,7 +682,6 @@ static const CRPCCommand commands[] =
|
|||||||
{ // category name actor (function) okSafeMode
|
{ // category name actor (function) okSafeMode
|
||||||
// --------------------- ------------------------ ----------------------- ----------
|
// --------------------- ------------------------ ----------------------- ----------
|
||||||
{ "network", "getconnectioncount", &getconnectioncount, true },
|
{ "network", "getconnectioncount", &getconnectioncount, true },
|
||||||
{ "network", "getdeprecationinfo", &getdeprecationinfo, true },
|
|
||||||
{ "network", "ping", &ping, true },
|
{ "network", "ping", &ping, true },
|
||||||
{ "network", "getpeerlist", &getpeerlist, true },
|
{ "network", "getpeerlist", &getpeerlist, true },
|
||||||
{ "network", "getpeerinfo", &getpeerinfo, true },
|
{ "network", "getpeerinfo", &getpeerinfo, true },
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
#include "consensus/validation.h"
|
#include "consensus/validation.h"
|
||||||
#include "core_io.h"
|
#include "core_io.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "deprecation.h"
|
|
||||||
#include "key_io.h"
|
#include "key_io.h"
|
||||||
#include "keystore.h"
|
#include "keystore.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|||||||
@@ -299,7 +299,6 @@ static const CRPCCommand vRPCCommands[] =
|
|||||||
|
|
||||||
/* P2P networking */
|
/* P2P networking */
|
||||||
{ "network", "getnetworkinfo", &getnetworkinfo, true },
|
{ "network", "getnetworkinfo", &getnetworkinfo, true },
|
||||||
{ "network", "getdeprecationinfo", &getdeprecationinfo, true },
|
|
||||||
{ "network", "addnode", &addnode, true },
|
{ "network", "addnode", &addnode, true },
|
||||||
{ "network", "disconnectnode", &disconnectnode, true },
|
{ "network", "disconnectnode", &disconnectnode, true },
|
||||||
{ "network", "getaddednodeinfo", &getaddednodeinfo, true },
|
{ "network", "getaddednodeinfo", &getaddednodeinfo, true },
|
||||||
|
|||||||
@@ -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 getwalletinfo(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||||
extern UniValue getblockchaininfo(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 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 setmocktime(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||||
extern UniValue resendwallettransactions(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
extern UniValue resendwallettransactions(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user