Revert GetBlockTrust changes
authoralex <alex@alex-VirtualBox.(none)>
Sat, 28 Sep 2013 17:56:25 +0000 (21:56 +0400)
committeralex <alex@alex-VirtualBox.(none)>
Sat, 28 Sep 2013 17:56:25 +0000 (21:56 +0400)
src/main.cpp

index 19f7992..68190ad 100644 (file)
@@ -2294,6 +2294,12 @@ uint256 CBlockIndex::GetBlockTrust() const
     if (bnTarget <= 0)
         return 0;
 
+    /* Old protocol */
+    if (!fTestNet && GetBlockTime() < CHAINCHECKS_SWITCH_TIME)
+        return (IsProofOfStake()? ((CBigNum(1)<<256) / (bnTarget+1)).getuint256() : 1);
+
+    /* New protocol */
+
     // Calculate work amount for block
     uint256 nPoWTrust = (CBigNum(nPoWBase) / (bnTarget+1)).getuint256();