mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
debug
This commit is contained in:
parent
4ec5370317
commit
a49cc8f5d5
@ -553,15 +553,20 @@ uint256 CMasterNode::CalculateScore(int mod, int64_t nBlockHeight)
|
||||
if(chainActive.Tip() == NULL) return 0;
|
||||
|
||||
uint256 hash = 0;
|
||||
uint256 aux = vin.prevout.hash;
|
||||
uint256 aux2 = vin.prevout.n;
|
||||
uint256 aux = vin.prevout.hash + vin.prevout.n;
|
||||
|
||||
if(!GetBlockHash(hash, nBlockHeight)) return 0;
|
||||
|
||||
LogPrintf("CMasterNode::CalculateScore 1 %d %s\n", nBlockHeight, hash.ToString().c_str());
|
||||
|
||||
uint256 hash2 = Hash(BEGIN(hash), END(hash));
|
||||
uint256 hash3 = Hash(BEGIN(hash), END(aux2));
|
||||
uint256 hash3 = Hash(BEGIN(hash), END(aux));
|
||||
|
||||
LogPrintf("CMasterNode::CalculateScore 2 %s %s\n", aux.ToString().c_str(), hash2.ToString().c_str());
|
||||
LogPrintf("CMasterNode::CalculateScore 3 %s %s\n", aux.ToString().c_str(), hash3.ToString().c_str());
|
||||
|
||||
uint256 r = (hash3 > hash2 ? hash3 - hash2 : hash2 - hash3);
|
||||
LogPrintf("CMasterNode::CalculateScore 4 %s %s\n", aux.ToString().c_str(), r.ToString().c_str());
|
||||
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user