Skip to content

Commit 23eaaae

Browse files
authored
Merge pull request #15 from CryptoCoderz/master
DigitalNote v1.0.1.7 Release
2 parents ba7df47 + 911ec6f commit 23eaaae

File tree

9 files changed

+38
-17
lines changed

9 files changed

+38
-17
lines changed

DigitalNote.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
TEMPLATE = app
22
TARGET = DigitalNote-qt
3-
VERSION = 1.0.1.6
3+
VERSION = 1.0.1.7
44
INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor
55
QT += core gui widgets network printsupport
66
DEFINES += ENABLE_WALLET

src/chainparams.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class CChainParams
7272
int StartPoSBlock() const { return nStartPoSBlock; }
7373
int PoolMaxTransactions() const { return nPoolMaxTransactions; }
7474
std::string MNenginePoolDummyAddress() const { return strMNenginePoolDummyAddress; }
75-
std::string DevOpsAddress() { return strDevOpsAddress; }
75+
std::string DevOpsAddress() const { return strDevOpsAddress; }
7676
protected:
7777
CChainParams() {/* Do Nothing */;}
7878

src/checkpoints.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace Checkpoints
3535
(45000, uint256("0x5308f77f44bffa63eb271e63fe003422d593930a92a9f5dd1ae7de5327a3218b"))
3636
(47500, uint256("0x0cb5289c555684443f303fcc7d1e8608732bdf48d90bca5a14a9b0c709066078"))
3737
(47700, uint256("0xf78d6c29f621194e786b4c470278663671c285993869a2d0d59bba31425c9a02"))
38+
(65544, uint256("0x000000000049a58f04f1beb0ed6c2e6ab11919b8a4323caee6e9a217c89eff69"))
3839
;
3940

4041
// TestNet has no checkpoints

src/clientversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define CLIENT_VERSION_MAJOR 1
1010
#define CLIENT_VERSION_MINOR 0
1111
#define CLIENT_VERSION_REVISION 1
12-
#define CLIENT_VERSION_BUILD 6
12+
#define CLIENT_VERSION_BUILD 7
1313

1414
// Set to true for release, false for prerelease or test build
1515
#define CLIENT_VERSION_IS_RELEASE true

src/fork.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ static const int64_t nReservePhaseStart = 1;
1414
static const int64_t nPaymentUpdate_1 = 1558310400;
1515
/** Masternode/Devops Payment Update 2 **/
1616
static const int64_t nPaymentUpdate_2 = 1562094000;
17+
/** Masternode/Devops Payment Update 3 **/
18+
static const int64_t nPaymentUpdate_3 = 1562281200;
1719
/** Velocity toggle block */
1820
static const int64_t VELOCITY_TOGGLE = 175; // Implementation of the Velocity system into the chain.
1921
/** Velocity retarget toggle block */

src/main.cpp

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,7 +2715,16 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot, bool fCheckSig) c
27152715
LogPrintf("CheckBlock() : PoS Recipient devops address validity succesfully verified\n");
27162716
} else {
27172717
LogPrintf("CheckBlock() : PoS Recipient devops address validity could not be verified\n");
2718-
fBlockHasPayments = false;
2718+
// Skip check during transition to new DevOps
2719+
if (pindexBest->GetBlockTime() < nPaymentUpdate_3) {
2720+
// Check legacy blocks for valid payment, only skip for Update_2
2721+
if (pindexBest->GetBlockTime() < nPaymentUpdate_2) {
2722+
fBlockHasPayments = false;
2723+
}
2724+
} else {
2725+
// Re-enable enforcement post transition (Update_3)
2726+
fBlockHasPayments = false;
2727+
}
27192728
}
27202729
if (nIndexedDevopsPayment == nDevopsPayment) {
27212730
LogPrintf("CheckBlock() : PoS Recipient devops amount validity succesfully verified\n");
@@ -2767,7 +2776,16 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot, bool fCheckSig) c
27672776
LogPrintf("CheckBlock() : PoW Recipient devops address validity succesfully verified\n");
27682777
} else {
27692778
LogPrintf("CheckBlock() : PoW Recipient devops address validity could not be verified\n");
2770-
fBlockHasPayments = false;
2779+
// Skip check during transition to new DevOps
2780+
if (pindexBest->GetBlockTime() < nPaymentUpdate_3) {
2781+
// Check legacy blocks for valid payment, only skip for Update_2
2782+
if (pindexBest->GetBlockTime() < nPaymentUpdate_2) {
2783+
fBlockHasPayments = false;
2784+
}
2785+
} else {
2786+
// Re-enable enforcement post transition (Update_3)
2787+
fBlockHasPayments = false;
2788+
}
27712789
}
27722790
if (nAmount == nDevopsPayment) {
27732791
LogPrintf("CheckBlock() : PoW Recipient devops amount validity succesfully verified\n");

src/miner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ CBlock* CreateNewBlock(CReserveKey& reservekey, bool fProofOfStake, int64_t* pFe
396396
//
397397
CBitcoinAddress devopaddress;
398398
if (Params().NetworkID() == CChainParams::MAIN) {
399-
if(GetTime() > nPaymentUpdate_2) { devopaddress = CBitcoinAddress("dHy3LZvqX5B2rAAoLiA7Y7rpvkLXKTkD18"); } // TODO: nothing, already set to a valid DigitalNote address
400-
else { devopaddress = CBitcoinAddress("dSCXLHTZJJqTej8ZRszZxbLrS6dDGVJhw7"); }
399+
if(GetTime() < nPaymentUpdate_2) { devopaddress = CBitcoinAddress("dSCXLHTZJJqTej8ZRszZxbLrS6dDGVJhw7"); } // TODO: nothing, already set to a valid DigitalNote address
400+
else { devopaddress = CBitcoinAddress("dHy3LZvqX5B2rAAoLiA7Y7rpvkLXKTkD18"); }
401401
} else if (Params().NetworkID() == CChainParams::TESTNET) {
402402
devopaddress = CBitcoinAddress("");
403403
} else if (Params().NetworkID() == CChainParams::REGTEST) {

src/version.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,34 @@ static const int DATABASE_VERSION = 70509;
3030
//
3131
// network protocol versioning
3232
//
33-
static const int PROTOCOL_VERSION = 62013;
33+
static const int PROTOCOL_VERSION = 62014;
3434

3535
// intial proto version, to be increased after version/verack negotiation
3636
static const int INIT_PROTO_VERSION = 209;
3737

3838
// disconnect from peers older than this proto version
39-
static const int MIN_PEER_PROTO_VERSION = 62009;
39+
static const int MIN_PEER_PROTO_VERSION = 62013;
4040

4141
// minimum peer version accepted by MNenginePool
42-
static const int MIN_POOL_PEER_PROTO_VERSION = 62007;
43-
static const int MIN_INSTANTX_PROTO_VERSION = 62007;
42+
static const int MIN_POOL_PEER_PROTO_VERSION = 62013;
43+
static const int MIN_INSTANTX_PROTO_VERSION = 62013;
4444

4545
//! minimum peer version that can receive masternode payments
4646
// V1 - Last protocol version before update
4747
// V2 - Newest protocol version
48-
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 62007;
49-
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 62007;
48+
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 62013;
49+
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 62013;
5050

5151
// nTime field added to CAddress, starting with this version;
5252
// if possible, avoid requesting addresses nodes older than this
5353
static const int CADDR_TIME_VERSION = 31402;
5454

5555
// only request blocks from nodes outside this range of versions
5656
static const int NOBLKS_VERSION_START = 0;
57-
static const int NOBLKS_VERSION_END = 62008;
57+
static const int NOBLKS_VERSION_END = 62012;
5858

5959
// hard cutoff time for legacy network connections
60-
static const int64_t HRD_LEGACY_CUTOFF = 1562094000; // ON (Tuesday, Jul 02, 2019 12:00:00 PM PDT)
60+
static const int64_t HRD_LEGACY_CUTOFF = 1562281200; // ON (Thursday, July 4, 2019 4:00:00 PM GMT-07:00)
6161

6262
// hard cutoff time for future network connections
6363
static const int64_t HRD_FUTURE_CUTOFF = 9993058800; // OFF (NOT TOGGLED)

src/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3053,8 +3053,8 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
30533053
// define address
30543054
CBitcoinAddress devopaddress;
30553055
if (Params().NetworkID() == CChainParams::MAIN) {
3056-
if(GetTime() > nPaymentUpdate_2) { devopaddress = CBitcoinAddress("dHy3LZvqX5B2rAAoLiA7Y7rpvkLXKTkD18"); } // TODO: nothing, already set to a valid DigitalNote address
3057-
else { devopaddress = CBitcoinAddress("dSCXLHTZJJqTej8ZRszZxbLrS6dDGVJhw7"); }
3056+
if(GetTime() < nPaymentUpdate_2) { devopaddress = CBitcoinAddress("dSCXLHTZJJqTej8ZRszZxbLrS6dDGVJhw7"); } // TODO: nothing, already set to a valid DigitalNote address
3057+
else { devopaddress = CBitcoinAddress("dHy3LZvqX5B2rAAoLiA7Y7rpvkLXKTkD18"); }
30583058
} else if (Params().NetworkID() == CChainParams::TESTNET) {
30593059
devopaddress = CBitcoinAddress("");
30603060
} else if (Params().NetworkID() == CChainParams::REGTEST) {

0 commit comments

Comments
 (0)