Skip to content

Commit

Permalink
Merge pull request #26 from coolblock/master
Browse files Browse the repository at this point in the history
Checkpoints and Other Changes
  • Loading branch information
coolblock committed May 16, 2019
2 parents cfee2eb + ad39633 commit 568d00a
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 17 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 12)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 15)
define(_CLIENT_VERSION_BUILD, 16)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2018)
AC_INIT([Vivo Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/vivocoin/vivo/issues],[vivocore])
Expand Down
4 changes: 2 additions & 2 deletions doc/masternode_conf.md
Expand Up @@ -10,8 +10,8 @@ Vivo Core allows controlling multiple remote masternodes from a single wallet. T

Example:
```
mn1 127.0.0.2:19999 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 7603c20a05258c208b58b0a0d77603b9fc93d47cfa403035f87f3ce0af814566 0
mn2 127.0.0.4:19999 92Da1aYg6sbenP6uwskJgEY2XWB5LwJ7bXRqc3UPeShtHWJDjDv 5d898e78244f3206e0105f421cdb071d95d111a51cd88eb5511fc0dbf4bfd95f 1
mn1 127.0.0.2:12845 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 7603c20a05258c208b58b0a0d77603b9fc93d47cfa403035f87f3ce0af814566 0
mn2 127.0.0.4:12845 92Da1aYg6sbenP6uwskJgEY2XWB5LwJ7bXRqc3UPeShtHWJDjDv 5d898e78244f3206e0105f421cdb071d95d111a51cd88eb5511fc0dbf4bfd95f 1
```

In the example above:
Expand Down
6 changes: 3 additions & 3 deletions doc/release-notes/vivo/release-notes-0.9.0.md
Expand Up @@ -448,11 +448,11 @@ However, there are some known issues:

Testing commands, you can start multiple wallets up and all denominate
on the same masternode for testing purposes:
/darkcoin-qt -datadir=/home/user/.darkcoin -listen=0 -darksendrounds=8 -usemasternode="192.168.56.102:19999"
/darkcoin-qt -datadir=/home/user/.darkcoin2 -listen=0 -darksendrounds=8 -usemasternode="192.168.56.102:19999"
/darkcoin-qt -datadir=/home/user/.darkcoin -listen=0 -darksendrounds=8 -usemasternode="192.168.56.102:12845"
/darkcoin-qt -datadir=/home/user/.darkcoin2 -listen=0 -darksendrounds=8 -usemasternode="192.168.56.102:12845"

and even disable darksend auto-denom if wanted:
/darkcoin-qt -datadir=/home/user/.darkcoin -listen=0 -darksendrounds=8 -usemasternode="192.168.56.102:19999" -disabledarksend=1
/darkcoin-qt -datadir=/home/user/.darkcoin -listen=0 -darksendrounds=8 -usemasternode="192.168.56.102:12845" -disabledarksend=1


0.9.12.7 Release notes
Expand Down
5 changes: 3 additions & 2 deletions src/chainparams.cpp
Expand Up @@ -181,8 +181,9 @@ class CMainParams : public CChainParams {
(307500, uint256S("0x0000000021ba9398d0458721e41a362396c31abcb751cf4520ce973b5f2d96d6"))
(308000, uint256S("0x0000000018ee47a3c93296309ce207724868232706f59a6937362581476ce462"))
(349891, uint256S("0x000000000965eb7af631e8717d10b477568a699cbb5cc172f723204f699e3488"))
(378129, uint256S("0x000000002f22a53a0228c6b94c960ba923df660531911392841196f641970b5f")),
1552522058, // * UNIX timestamp of last checkpoint block
(378129, uint256S("0x000000002f22a53a0228c6b94c960ba923df660531911392841196f641970b5f"))
(420300, uint256S("0x0000000037e291974d11f3f0c5309632db5d1b5c70162014a11e3de7920a548b")),
1557968975, // * UNIX timestamp of last checkpoint block
5000, // * total number of transactions between genesis and last checkpoint
// (the tx=... number in the SetBestChain debug.log lines)
500 // * estimated number of transactions per day after checkpoint
Expand Down
41 changes: 33 additions & 8 deletions src/main.cpp
Expand Up @@ -5291,13 +5291,23 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
uint64_t nNonce = 1;
vRecv >> pfrom->nVersion >> pfrom->nServices >> nTime >> addrMe;

// Current405523
#define TWO_WEEKS_SINCE_BLOCK 414483
#define FOUR_WEEKS_SINCE_BLOCK 423443
#define SIX_WEEKS_SINCE_BLOCK 432403

if (chainActive.Height() > SIX_WEEKS_SINCE_BLOCK) {
LogPrintf("ZZZZZZZZZZZZ GET NEW VERSION- UPGRADE VIVO\n");

#define LEGACY_TWO_WEEKS_SINCE_BLOCK 414483
#define LEGACY_FOUR_WEEKS_SINCE_BLOCK 423443
#define LEGACY_SIX_WEEKS_SINCE_BLOCK 432403


//May 15, 2019 6:19:38 PM
// Current420307
#define TWO_WEEKS_SINCE_BLOCK 429267
#define FOUR_WEEKS_SINCE_BLOCK 438227
#define SIX_WEEKS_SINCE_BLOCK 447187
#define THREE_MONTHS_SINCE_BLOCK 474067
#define FOUR_MONTHS_PLUS_TWOWEEKS_SINCE_BLOCK 500947

if (chainActive.Height() > FOUR_MONTHS_PLUS_TWOWEEKS_SINCE_BLOCK) {
LogPrintf("YOU NEED TO GET NEW VERSION- UPGRADE VIVO\n");
StartShutdown();
}

Expand Down Expand Up @@ -5336,7 +5346,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,


//MODS
if (chainActive.Height() > TWO_WEEKS_SINCE_BLOCK) {
if (chainActive.Height() > LEGACY_TWO_WEEKS_SINCE_BLOCK) {
LogPrintf("===================xxxxxxxxxx1===========================\n");
string searchVersion ("Vivo Core:0.12.1.12");
if (pfrom->cleanSubVer.find(searchVersion) != std::string::npos)
Expand All @@ -5349,7 +5359,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
}
}

if (chainActive.Height() > FOUR_WEEKS_SINCE_BLOCK) {

if (chainActive.Height() > LEGACY_FOUR_WEEKS_SINCE_BLOCK) {
LogPrintf("===================xxxxxxxxxx2===========================\n");
string searchVersion ("Vivo Core:0.12.1.14");
if (pfrom->cleanSubVer.find(searchVersion) != std::string::npos)
Expand All @@ -5361,6 +5372,20 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
return false;
}
}


if (chainActive.Height() > LEGACY_SIX_WEEKS_SINCE_BLOCK) {
LogPrintf("===================xxxxxxxxxx3===========================\n");
string searchVersion ("Vivo Core:0.12.1.15");
if (pfrom->cleanSubVer.find(searchVersion) != std::string::npos)
{
LogPrintf("******************* peer=%d using obsolete version %i %s; disconnecting\n", pfrom->id, pfrom->cleanSubVer, remoteAddrx);
//pfrom->PushMessage(NetMsgType::REJECT, strCommand, REJECT_OBSOLETE,
// strprintf("Version must be %d or greater", MIN_PEER_PROTO_VERSION));
pfrom->fDisconnect = true;
return false;
}
}
//END MODS


Expand Down
2 changes: 1 addition & 1 deletion src/masternodeconfig.cpp
Expand Up @@ -24,7 +24,7 @@ bool CMasternodeConfig::read(std::string& strErr) {
if (configFile != NULL) {
std::string strHeader = "# Masternode config file\n"
"# Format: alias IP:port masternodeprivkey collateral_output_txid collateral_output_index\n"
"# Example: mn1 127.0.0.2:19999 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0\n";
"# Example: mn1 127.0.0.2:12845 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0\n";
fwrite(strHeader.c_str(), std::strlen(strHeader.c_str()), 1, configFile);
fclose(configFile);
}
Expand Down

0 comments on commit 568d00a

Please sign in to comment.