merge downstream 0.11.1

This commit is contained in:
vertoe 2015-02-13 09:25:59 +01:00
commit 9dc8c1cf07
4 changed files with 10 additions and 8 deletions

View File

@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 11) define(_CLIENT_VERSION_MINOR, 11)
define(_CLIENT_VERSION_REVISION, 1) define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 22) define(_CLIENT_VERSION_BUILD, 23)
define(_CLIENT_VERSION_IS_RELEASE, true) define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2015) define(_COPYRIGHT_YEAR, 2015)
AC_INIT([Darkcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@darkcoin.io],[darkcoin]) AC_INIT([Darkcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@darkcoin.io],[darkcoin])

View File

@ -12,7 +12,7 @@
#define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 11 #define CLIENT_VERSION_MINOR 11
#define CLIENT_VERSION_REVISION 1 #define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_BUILD 22 #define CLIENT_VERSION_BUILD 23

View File

@ -4053,8 +4053,9 @@ void static ProcessGetData(CNode* pfrom)
if (!pushed && inv.type == MSG_MASTERNODE_WINNER) { if (!pushed && inv.type == MSG_MASTERNODE_WINNER) {
if(mapSeenMasternodeVotes.count(inv.hash)){ if(mapSeenMasternodeVotes.count(inv.hash)){
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
int a = 0;
ss.reserve(1000); ss.reserve(1000);
ss << mapSeenMasternodeVotes[inv.hash]; ss << mapSeenMasternodeVotes[inv.hash] << a;
pfrom->PushMessage("mnw", ss); pfrom->PushMessage("mnw", ss);
pushed = true; pushed = true;
} }

View File

@ -331,7 +331,8 @@ void ProcessMessageMasternode(CNode* pfrom, std::string& strCommand, CDataStream
else if (strCommand == "mnw") { //Masternode Payments Declare Winner else if (strCommand == "mnw") { //Masternode Payments Declare Winner
//this is required in litemode //this is required in litemode
CMasternodePaymentWinner winner; CMasternodePaymentWinner winner;
vRecv >> winner; int a = 0;
vRecv >> winner >> a;
if(chainActive.Tip() == NULL) return; if(chainActive.Tip() == NULL) return;
@ -600,7 +601,7 @@ void CMasterNode::Check()
bool CMasternodePayments::CheckSignature(CMasternodePaymentWinner& winner) bool CMasternodePayments::CheckSignature(CMasternodePaymentWinner& winner)
{ {
//note: need to investigate why this is failing //note: need to investigate why this is failing
std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight); std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight) + winner.payee.ToString();
std::string strPubKey = (Params().NetworkID() == CChainParams::MAIN) ? strMainPubKey : strTestPubKey; std::string strPubKey = (Params().NetworkID() == CChainParams::MAIN) ? strMainPubKey : strTestPubKey;
CPubKey pubkey(ParseHex(strPubKey)); CPubKey pubkey(ParseHex(strPubKey));
@ -614,7 +615,7 @@ bool CMasternodePayments::CheckSignature(CMasternodePaymentWinner& winner)
bool CMasternodePayments::Sign(CMasternodePaymentWinner& winner) bool CMasternodePayments::Sign(CMasternodePaymentWinner& winner)
{ {
std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight); std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight) + winner.payee.ToString();
CKey key2; CKey key2;
CPubKey pubkey2; CPubKey pubkey2;
@ -649,7 +650,7 @@ uint64_t CMasternodePayments::CalculateScore(uint256 blockHash, CTxIn& vin)
//printf(" -- CMasternodePayments CalculateScore() n2 = %d \n", n2.Get64()); //printf(" -- CMasternodePayments CalculateScore() n2 = %d \n", n2.Get64());
//printf(" -- CMasternodePayments CalculateScore() n3 = %d \n", n3.Get64()); //printf(" -- CMasternodePayments CalculateScore() n3 = %d \n", n3.Get64());
//printf(" -- CMasternodePayments CalculateScore() n4 = %d \n", n4.Get64()); //printf(" -- CMasternodePayments CalculateScore() n4 = %d \n", n4.Get64());
return n4.Get64(); return n4.Get64();
} }
@ -705,7 +706,7 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
if(!foundBlock){ if(!foundBlock){
vWinning.push_back(winnerIn); vWinning.push_back(winnerIn);
mapSeenMasternodeVotes.insert(make_pair(winnerIn.GetHash(), winnerIn)); mapSeenMasternodeVotes.insert(make_pair(winnerIn.GetHash(), winnerIn));
return true; return true;
} }