]> Git Repo - VerusCoin.git/commitdiff
test
authorjl777 <[email protected]>
Thu, 19 Apr 2018 11:44:05 +0000 (14:44 +0300)
committerjl777 <[email protected]>
Thu, 19 Apr 2018 11:44:05 +0000 (14:44 +0300)
src/main.cpp
src/pow.cpp

index 5e8c766507973feb283bd1429d0dd197e68127ed..34c39424db6f4e9cb52bb996f2eedcd6c5a66b09 100644 (file)
@@ -3789,9 +3789,9 @@ bool CheckBlock(int32_t height,CBlockIndex *pindex,const CBlock& block, CValidat
         if ( !CheckProofOfWork(height,pubkey33,block.GetHash(),block.nBits,Params().GetConsensus(),block.nTime) )
         {
             int32_t z; uint256 h = block.GetHash();
-            for (z=0; z<32; z++)
+            for (z=31; z>=0; z--)
                 fprintf(stderr,"%02x",((uint8_t *)&h)[z]);
-            fprintf(stderr," failed hash\n");
+            fprintf(stderr," failed hash ht.%d\n",height);
             return state.DoS(50, error("CheckBlock: proof of work failed"),REJECT_INVALID, "high-hash");
         }
         if ( komodo_checkPOW(1,(CBlock *)&block,height) < 0 ) // checks Equihash
index 0cb6e89ce73e326ccaf493604b6891fdb303320a..2de78050f1891f1c31d59839262cef860b4f078e 100644 (file)
@@ -136,6 +136,9 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash,unsigned int
     extern int32_t KOMODO_REWIND;
     bool fNegative,fOverflow; uint8_t origpubkey33[33]; int32_t i,nonzpkeys=0,nonz=0,special=0,special2=0,notaryid=-1,flag = 0, mids[66]; uint32_t tiptime,blocktimes[66];
     arith_uint256 bnTarget; uint8_t pubkeys[66][33];
+    for (i=31; i>=0; i--)
+        fprintf(stderr,"%02x",((uint8_t *)&hash)[i]);
+    fprintf(stderr," checkpow\n");
     memcpy(origpubkey33,pubkey33,33);
     memset(blocktimes,0,sizeof(blocktimes));
     tiptime = komodo_chainactive_timestamp();
@@ -195,17 +198,17 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash,unsigned int
             //if ( 0 && height > 792000 )
             {
                 for (i=31; i>=0; i--)
-                    printf("%02x",((uint8_t *)&hash)[i]);
-                printf(" hash vs ");
+                    fprintf(stderr,"%02x",((uint8_t *)&hash)[i]);
+                fprintf(stderr," hash vs ");
                 for (i=31; i>=0; i--)
-                    printf("%02x",((uint8_t *)&bnTarget)[i]);
-                printf(" ht.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,special,notaryid,height,(height % 35));
+                    fprintf(stderr,"%02x",((uint8_t *)&bnTarget)[i]);
+                fprintf(stderr," ht.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,special,notaryid,fheight,(height % 35));
                 for (i=0; i<33; i++)
-                    printf("%02x",pubkey33[i]);
-                printf(" <- pubkey\n");
+                    fprintf(stderr,"%02x",pubkey33[i]);
+                fprintf(stderr," <- pubkey\n");
                 for (i=0; i<33; i++)
-                    printf("%02x",origpubkey33[i]);
-                printf(" <- origpubkey\n");
+                    fprintf(stderr,"%02x",origpubkey33[i]);
+                fprintf(stderr," <- origpubkey\n");
             }
             return false;
         }
This page took 0.039637 seconds and 4 git commands to generate.