mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
fixed caching
This commit is contained in:
parent
a119b3008c
commit
886f45379a
@ -531,7 +531,7 @@ bool GetBlockHash(uint256& hash, int nBlockHeight)
|
|||||||
for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) {
|
for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) {
|
||||||
if(n >= nBlocksAgo){
|
if(n >= nBlocksAgo){
|
||||||
hash = BlockReading->GetBlockHash();
|
hash = BlockReading->GetBlockHash();
|
||||||
mapCacheBlockHashes[nBlockHeight-n] = hash;
|
mapCacheBlockHashes[nBlockHeight] = hash;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
n++;
|
n++;
|
||||||
@ -695,6 +695,7 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
|
|||||||
winner.vin = winnerIn.vin;
|
winner.vin = winnerIn.vin;
|
||||||
winner.payee = winnerIn.payee;
|
winner.payee = winnerIn.payee;
|
||||||
winner.vchSig = winnerIn.vchSig;
|
winner.vchSig = winnerIn.vchSig;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -704,6 +705,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user