Tweaks
This commit is contained in:
@@ -548,17 +548,17 @@ void hush_changeblocktime()
|
||||
|
||||
void hush_setactivation(int32_t height)
|
||||
{
|
||||
pCurrentParams->consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = height;
|
||||
pCurrentParams->consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = height;
|
||||
pCurrentParams->consensus.vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight = height;
|
||||
ASSETCHAINS_SAPLING = height;
|
||||
fprintf(stderr,"SET SAPLING ACTIVATION height.%d\n",height);
|
||||
}
|
||||
|
||||
void *chainparams_commandline()
|
||||
{
|
||||
fprintf(stderr,"chainparams_commandline called\n");
|
||||
void *chainparams_commandline() {
|
||||
CChainParams::CCheckpointData checkpointData;
|
||||
//fprintf(stderr,">>>>>>>> port.%u\n",ASSETCHAINS_P2PPORT);
|
||||
if(fDebug) {
|
||||
fprintf(stderr,"chainparams_commandline called with port=%u\n", ASSETCHAINS_P2PPORT);
|
||||
}
|
||||
if ( SMART_CHAIN_SYMBOL[0] != 0 )
|
||||
{
|
||||
if ( ASSETCHAINS_BLOCKTIME != 60 )
|
||||
|
||||
24
src/init.cpp
24
src/init.cpp
@@ -127,11 +127,7 @@ static const char* DEFAULT_ASMAP_FILENAME="ip_asn.map";
|
||||
|
||||
CClientUIInterface uiInterface; // Declared but not defined in ui_interface.h
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Shutdown
|
||||
//
|
||||
|
||||
//
|
||||
// Thread management and startup/shutdown:
|
||||
//
|
||||
@@ -151,7 +147,6 @@ CClientUIInterface uiInterface; // Declared but not defined in ui_interface.h
|
||||
// Note that if running -daemon the parent process returns from AppInit2
|
||||
// before adding any threads to the threadGroup, so .join_all() returns
|
||||
// immediately and the parent exits from main().
|
||||
//
|
||||
|
||||
std::atomic<bool> fRequestShutdown(false);
|
||||
|
||||
@@ -201,7 +196,8 @@ void Interrupt(boost::thread_group& threadGroup)
|
||||
|
||||
void Shutdown()
|
||||
{
|
||||
fprintf(stderr,"%s: start\n", __FUNCTION__);
|
||||
if(fDebug)
|
||||
fprintf(stderr,"%s: start\n", __FUNCTION__);
|
||||
LogPrintf("%s: In progress...\n", __func__);
|
||||
static CCriticalSection cs_Shutdown;
|
||||
TRY_LOCK(cs_Shutdown, lockShutdown);
|
||||
@@ -217,7 +213,7 @@ void Shutdown()
|
||||
RenameThread(shutoffstr);
|
||||
mempool.AddTransactionsUpdated(1);
|
||||
|
||||
fprintf(stderr,"%s: stopping HTTP/REST/RPC\n", __FUNCTION__);
|
||||
fprintf(stderr,"%s: stopping HUSH HTTP/REST/RPC\n", __FUNCTION__);
|
||||
StopHTTPRPC();
|
||||
StopREST();
|
||||
StopRPC();
|
||||
@@ -288,17 +284,13 @@ void Shutdown()
|
||||
delete pwalletMain;
|
||||
pwalletMain = NULL;
|
||||
#endif
|
||||
//delete pzcashParams;
|
||||
//pzcashParams = NULL;
|
||||
globalVerifyHandle.reset();
|
||||
ECC_Stop();
|
||||
CNode::NetCleanup();
|
||||
LogPrintf("%s: done\n", __func__);
|
||||
}
|
||||
|
||||
/**
|
||||
* Signal handlers are very limited in what they are allowed to do, so:
|
||||
*/
|
||||
// Signal handlers are very limited in what they are allowed to do, so:
|
||||
void HandleSIGTERM(int)
|
||||
{
|
||||
fprintf(stderr,"%s\n",__FUNCTION__);
|
||||
@@ -359,7 +351,6 @@ std::string HelpMessage(HelpMessageMode mode)
|
||||
|
||||
string strUsage = HelpMessageGroup(_("Options:"));
|
||||
strUsage += HelpMessageOpt("-?", _("This help message"));
|
||||
strUsage += HelpMessageOpt("-alerts", strprintf(_("Receive and display P2P network alerts (default: %u)"), DEFAULT_ALERTS));
|
||||
strUsage += HelpMessageOpt("-alertnotify=<cmd>", _("Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)"));
|
||||
strUsage += HelpMessageOpt("-blocknotify=<cmd>", _("Execute command when the best block changes (%s in cmd is replaced by block hash)"));
|
||||
strUsage += HelpMessageOpt("-checkblocks=<n>", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), 288));
|
||||
@@ -1028,9 +1019,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
if (mapArgs.count("-developerencryptwallet")) {
|
||||
fprintf(stderr,"%s wallet encryption error\n", __FUNCTION__);
|
||||
return InitError(_("Wallet encryption requires -experimentalfeatures."));
|
||||
} else if (mapArgs.count("-zmergetoaddress")) {
|
||||
//fprintf(stderr,"%s zmerge error\n", __FUNCTION__);
|
||||
//return InitError(_("RPC method z_mergetoaddress requires -experimentalfeatures."));
|
||||
}
|
||||
}
|
||||
//fprintf(stderr,"%s tik2\n", __FUNCTION__);
|
||||
@@ -2024,9 +2012,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
{
|
||||
pwalletMain->ClearNoteWitnessCache();
|
||||
pindexRescan = chainActive.Genesis();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
CWalletDB walletdb(strWalletFile);
|
||||
CBlockLocator locator;
|
||||
if (walletdb.ReadBestBlock(locator))
|
||||
|
||||
@@ -499,7 +499,8 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
|
||||
nbits = bnTarget.GetCompact();
|
||||
nbits = (nbits & 0xfffffffc) | zawyflag;
|
||||
}
|
||||
fprintf(stderr,"%s: nbits=%d\n", __func__, nbits);
|
||||
if(fDebug)
|
||||
fprintf(stderr,"%s: nbits=%d\n", __func__, nbits);
|
||||
return(nbits);
|
||||
}
|
||||
|
||||
@@ -542,6 +543,8 @@ unsigned int CalculateNextWorkRequired(arith_uint256 bnAvg,
|
||||
LogPrint("pow", "Current average: %08x %s\n", bnAvg.GetCompact(), bnAvg.ToString());
|
||||
LogPrint("pow", "After: %08x %s\n", bnNew.GetCompact(), bnNew.ToString());
|
||||
|
||||
if(fDebug)
|
||||
fprintf(stderr,"%s: nbits=%u\n",__func__,nbits);
|
||||
return bnNew.GetCompact();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
* Removal or modification of this copyright notice is prohibited. *
|
||||
* *
|
||||
******************************************************************************/
|
||||
|
||||
#include "rpc/server.h"
|
||||
|
||||
#include "clientversion.h"
|
||||
#include "main.h"
|
||||
#include "net.h"
|
||||
@@ -31,9 +29,7 @@
|
||||
#include "version.h"
|
||||
#include "deprecation.h"
|
||||
#include "hush/utiltls.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include <univalue.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
Reference in New Issue
Block a user