From a49cc8f5d55855ffd723ab199c5365310a5116f5 Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Sat, 7 Feb 2015 12:35:33 -0700 Subject: [PATCH] debug --- src/masternode.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/masternode.cpp b/src/masternode.cpp index 1fca22b6d..ef37cc268 100644 --- a/src/masternode.cpp +++ b/src/masternode.cpp @@ -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; }