Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DigitalNote.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = DigitalNote-qt
VERSION = 1.0.1.6
VERSION = 1.0.1.7
INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor
QT += core gui widgets network printsupport
DEFINES += ENABLE_WALLET
Expand Down
2 changes: 1 addition & 1 deletion src/chainparams.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class CChainParams
int StartPoSBlock() const { return nStartPoSBlock; }
int PoolMaxTransactions() const { return nPoolMaxTransactions; }
std::string MNenginePoolDummyAddress() const { return strMNenginePoolDummyAddress; }
std::string DevOpsAddress() { return strDevOpsAddress; }
std::string DevOpsAddress() const { return strDevOpsAddress; }
protected:
CChainParams() {/* Do Nothing */;}

Expand Down
1 change: 1 addition & 0 deletions src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace Checkpoints
(45000, uint256("0x5308f77f44bffa63eb271e63fe003422d593930a92a9f5dd1ae7de5327a3218b"))
(47500, uint256("0x0cb5289c555684443f303fcc7d1e8608732bdf48d90bca5a14a9b0c709066078"))
(47700, uint256("0xf78d6c29f621194e786b4c470278663671c285993869a2d0d59bba31425c9a02"))
(65544, uint256("0x000000000049a58f04f1beb0ed6c2e6ab11919b8a4323caee6e9a217c89eff69"))
;

// TestNet has no checkpoints
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_BUILD 6
#define CLIENT_VERSION_BUILD 7

// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
2 changes: 2 additions & 0 deletions src/fork.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ static const int64_t nReservePhaseStart = 1;
static const int64_t nPaymentUpdate_1 = 1558310400;
/** Masternode/Devops Payment Update 2 **/
static const int64_t nPaymentUpdate_2 = 1562094000;
/** Masternode/Devops Payment Update 3 **/
static const int64_t nPaymentUpdate_3 = 1562281200;
/** Velocity toggle block */
static const int64_t VELOCITY_TOGGLE = 175; // Implementation of the Velocity system into the chain.
/** Velocity retarget toggle block */
Expand Down
22 changes: 20 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,16 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot, bool fCheckSig) c
LogPrintf("CheckBlock() : PoS Recipient devops address validity succesfully verified\n");
} else {
LogPrintf("CheckBlock() : PoS Recipient devops address validity could not be verified\n");
fBlockHasPayments = false;
// Skip check during transition to new DevOps
if (pindexBest->GetBlockTime() < nPaymentUpdate_3) {
// Check legacy blocks for valid payment, only skip for Update_2
if (pindexBest->GetBlockTime() < nPaymentUpdate_2) {
fBlockHasPayments = false;
}
} else {
// Re-enable enforcement post transition (Update_3)
fBlockHasPayments = false;
}
}
if (nIndexedDevopsPayment == nDevopsPayment) {
LogPrintf("CheckBlock() : PoS Recipient devops amount validity succesfully verified\n");
Expand Down Expand Up @@ -2767,7 +2776,16 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot, bool fCheckSig) c
LogPrintf("CheckBlock() : PoW Recipient devops address validity succesfully verified\n");
} else {
LogPrintf("CheckBlock() : PoW Recipient devops address validity could not be verified\n");
fBlockHasPayments = false;
// Skip check during transition to new DevOps
if (pindexBest->GetBlockTime() < nPaymentUpdate_3) {
// Check legacy blocks for valid payment, only skip for Update_2
if (pindexBest->GetBlockTime() < nPaymentUpdate_2) {
fBlockHasPayments = false;
}
} else {
// Re-enable enforcement post transition (Update_3)
fBlockHasPayments = false;
}
}
if (nAmount == nDevopsPayment) {
LogPrintf("CheckBlock() : PoW Recipient devops amount validity succesfully verified\n");
Expand Down
4 changes: 2 additions & 2 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ CBlock* CreateNewBlock(CReserveKey& reservekey, bool fProofOfStake, int64_t* pFe
//
CBitcoinAddress devopaddress;
if (Params().NetworkID() == CChainParams::MAIN) {
if(GetTime() > nPaymentUpdate_2) { devopaddress = CBitcoinAddress("dHy3LZvqX5B2rAAoLiA7Y7rpvkLXKTkD18"); } // TODO: nothing, already set to a valid DigitalNote address
else { devopaddress = CBitcoinAddress("dSCXLHTZJJqTej8ZRszZxbLrS6dDGVJhw7"); }
if(GetTime() < nPaymentUpdate_2) { devopaddress = CBitcoinAddress("dSCXLHTZJJqTej8ZRszZxbLrS6dDGVJhw7"); } // TODO: nothing, already set to a valid DigitalNote address
else { devopaddress = CBitcoinAddress("dHy3LZvqX5B2rAAoLiA7Y7rpvkLXKTkD18"); }
} else if (Params().NetworkID() == CChainParams::TESTNET) {
devopaddress = CBitcoinAddress("");
} else if (Params().NetworkID() == CChainParams::REGTEST) {
Expand Down
16 changes: 8 additions & 8 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,34 @@ static const int DATABASE_VERSION = 70509;
//
// network protocol versioning
//
static const int PROTOCOL_VERSION = 62013;
static const int PROTOCOL_VERSION = 62014;

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

// disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION = 62009;
static const int MIN_PEER_PROTO_VERSION = 62013;

// minimum peer version accepted by MNenginePool
static const int MIN_POOL_PEER_PROTO_VERSION = 62007;
static const int MIN_INSTANTX_PROTO_VERSION = 62007;
static const int MIN_POOL_PEER_PROTO_VERSION = 62013;
static const int MIN_INSTANTX_PROTO_VERSION = 62013;

//! minimum peer version that can receive masternode payments
// V1 - Last protocol version before update
// V2 - Newest protocol version
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 62007;
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 62007;
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 62013;
static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 62013;

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

// only request blocks from nodes outside this range of versions
static const int NOBLKS_VERSION_START = 0;
static const int NOBLKS_VERSION_END = 62008;
static const int NOBLKS_VERSION_END = 62012;

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

// hard cutoff time for future network connections
static const int64_t HRD_FUTURE_CUTOFF = 9993058800; // OFF (NOT TOGGLED)
Expand Down
4 changes: 2 additions & 2 deletions src/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3053,8 +3053,8 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
// define address
CBitcoinAddress devopaddress;
if (Params().NetworkID() == CChainParams::MAIN) {
if(GetTime() > nPaymentUpdate_2) { devopaddress = CBitcoinAddress("dHy3LZvqX5B2rAAoLiA7Y7rpvkLXKTkD18"); } // TODO: nothing, already set to a valid DigitalNote address
else { devopaddress = CBitcoinAddress("dSCXLHTZJJqTej8ZRszZxbLrS6dDGVJhw7"); }
if(GetTime() < nPaymentUpdate_2) { devopaddress = CBitcoinAddress("dSCXLHTZJJqTej8ZRszZxbLrS6dDGVJhw7"); } // TODO: nothing, already set to a valid DigitalNote address
else { devopaddress = CBitcoinAddress("dHy3LZvqX5B2rAAoLiA7Y7rpvkLXKTkD18"); }
} else if (Params().NetworkID() == CChainParams::TESTNET) {
devopaddress = CBitcoinAddress("");
} else if (Params().NetworkID() == CChainParams::REGTEST) {
Expand Down