Skip to content

Commit 2bd6379

Browse files
author
Evan Duffield
committed
fixed GetBlockPayee
1 parent 9dba880 commit 2bd6379

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

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 0
1010
#define CLIENT_VERSION_MINOR 10
1111
#define CLIENT_VERSION_REVISION 15
12-
#define CLIENT_VERSION_BUILD 15
12+
#define CLIENT_VERSION_BUILD 17
1313

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

src/darksend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
12781278
}
12791279
}
12801280

1281-
return true;
1281+
return false;
12821282
}
12831283
}
12841284

src/main.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,8 +2601,12 @@ bool CBlock::CheckBlock(CValidationState &state, bool fCheckPOW, bool fCheckMerk
26012601
foundPayee = true;
26022602
}
26032603

2604-
if(!foundPaymentAmount || !foundPayee ) {
2605-
LogPrintf("CheckBlock() : Couldn't find masternode payment(%d) or payee(%d). \n", foundPaymentAmount, foundPayee);
2604+
if(!foundPaymentAmount || !foundPayee) {
2605+
CTxDestination address1;
2606+
ExtractDestination(payee, address1);
2607+
CBitcoinAddress address2(address1);
2608+
2609+
LogPrintf("CheckBlock() : Couldn't find masternode payment(%d|%"PRI64u") or payee(%d|%s). \n", foundPaymentAmount, masternodePaymentAmount, foundPayee, address2.ToString().c_str());
26062610
if(EnforceMasternodePayments) return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
26072611
}
26082612
}
@@ -4320,7 +4324,13 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
43204324
if(mn.vin.prevout == vin.prevout) {
43214325
if(!mn.UpdatedWithin(MASTERNODE_MIN_SECONDS)){
43224326
mn.UpdateLastSeen();
4323-
mn.pubkey2 = pubkey2;
4327+
4328+
if(mn.now < sigTime){ //take the newest entry
4329+
LogPrintf("dsee - Got updated entry for %s\n", addr.ToString().c_str());
4330+
mn.pubkey2 = pubkey2;
4331+
mn.now = sigTime;
4332+
mn.sig = vchSig;
4333+
}
43244334

43254335
if(pubkey2 == darkSendPool.pubkeyMasterNode2){
43264336
darkSendPool.EnableHotColdMasterNode(vin, sigTime, addr);

0 commit comments

Comments
 (0)