Skip to content

Commit

Permalink
Merge pull request #42 from MrSlosh/master
Browse files Browse the repository at this point in the history
Minor fixes for sync issues and occasional windows DB corruption. Includes added RPC function to discconect from peers
  • Loading branch information
MrSlosh authored Nov 16, 2018
2 parents d4698dd + bd6c384 commit dcd4bd5
Show file tree
Hide file tree
Showing 13 changed files with 158 additions and 238 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 3)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 19)
define(_CLIENT_VERSION_BUILD, 20)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2018)
AC_INIT([NewYorkCoin],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/NewYorkCoin-NYC/nycoin/issues],[newyorkcoin])
Expand Down
3 changes: 2 additions & 1 deletion src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ class CMainParams : public CChainParams {
(3000000, uint256S("0x66e6dcb49370062537c1f6abf655ffbbc53ba4851ef00081aa2e4be1e2903ba7"))
(3500000, uint256S("0x3f1a97f68ce8eaf38fc0c56868b3eb98ccb67d14bff4e78afb91d82cba853ddf"))
(3938415, uint256S("0xe1fa41f6fe8d2785d89b0468e13e4c450493e5356c024a098c5b727ca89138ee"))
(4500000, uint256S("0xdd86fad58b3fa5d83a15a18df1cc20cdcdb1b2cf5d2d702e0c60bbb7d4602fb1")),
(4500000, uint256S("0xdd86fad58b3fa5d83a15a18df1cc20cdcdb1b2cf5d2d702e0c60bbb7d4602fb1"))
(4821195, uint256S("0x7cf9862123405a687626b27ecaea377698d23d68458bb9b2a16e0262ec32df84")),

1514765144, // * UNIX timestamp of last checkpoint block
5141422, // * total number of transactions between genesis and last checkpoint
Expand Down
18 changes: 13 additions & 5 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-seednode=<ip>", _("Connect to a node to retrieve peer addresses, and disconnect"));
strUsage += HelpMessageOpt("-timeout=<n>", strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"), DEFAULT_CONNECT_TIMEOUT));
strUsage += HelpMessageOpt("-bloomfilters", _("Allow peers to set bloom filters (default: 1)"));
strUsage += HelpMessageOpt("-fastsync", _("Increases maximum number of in-flight blocks and only perform minimal block validation"));
#ifdef USE_UPNP
#if USE_UPNP
strUsage += HelpMessageOpt("-upnp", _("Use UPnP to map the listening port (default: 1 when listening)"));
Expand All @@ -332,7 +333,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-whitebind=<addr>", _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6"));
strUsage += HelpMessageOpt("-whitelist=<netmask>", _("Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.") +
" " + _("Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway"));


#ifdef ENABLE_WALLET
strUsage += HelpMessageGroup(_("Wallet options:"));
Expand Down Expand Up @@ -451,7 +452,9 @@ std::string LicenseInfo()
{
return FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Bitcoin Core Developers"), COPYRIGHT_YEAR)) + "\n" +
"\n" +
FormatParagraph(strprintf(_("Copyright (C) 2013-%i The NewYorkCoin Developers"), COPYRIGHT_YEAR)) + "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2013-%i The DogeCoin Developers"), COPYRIGHT_YEAR)) + "\n" +
"\n" +
FormatParagraph(strprintf(_("Copyright (C) 2017-%i The NewYorkCoin Developers"), COPYRIGHT_YEAR)) + "\n" +
"\n" +
FormatParagraph(_("This is experimental software.")) + "\n" +
"\n" +
Expand Down Expand Up @@ -734,6 +737,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
LogPrintf("%s: parameter interaction: -salvagewallet=1 -> setting -rescan=1\n", __func__);
}

if (GetBoolArg("-fastsync", false))
{
LogPrintf("%s: parameter interaction: -fastsync=1 increasing max blocks in flight and minimizing block checks\n", __func__);
}

// -zapwallettx implies a rescan
if (GetBoolArg("-zapwallettxes", false)) {
if (SoftSetBoolArg("-rescan", true))
Expand Down Expand Up @@ -975,15 +983,15 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)

std::string warningString;
std::string errorString;

if (!CWallet::Verify(strWalletFile, warningString, errorString))
return false;

if (!warningString.empty())
InitWarning(warningString);
if (!errorString.empty())
return InitError(warningString);

} // (!fDisableWallet)
#endif // ENABLE_WALLET
// ********************************************************* Step 6: network initialization
Expand Down
Loading

0 comments on commit dcd4bd5

Please sign in to comment.