]> Git Repo - VerusCoin.git/commitdiff
Test
authorjl777 <[email protected]>
Fri, 13 Apr 2018 14:04:23 +0000 (17:04 +0300)
committerjl777 <[email protected]>
Fri, 13 Apr 2018 14:04:23 +0000 (17:04 +0300)
src/komodo_bitcoind.h
src/main.cpp
src/pow.cpp

index 428233a1ba1acd9c4a346fe6efe4b6cdedb11d0a..52d09cb20b6d2331ab90b376592b64aaf4e8734d 100644 (file)
@@ -765,7 +765,7 @@ void komodo_index2pubkey33(uint8_t *pubkey33,CBlockIndex *pindex,int32_t height)
     memset(pubkey33,0,33);
     if ( pindex != 0 )
     {
-        if ( pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3 )
+        if ( pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3 || pindex->pubkey33[0] == 0xff )
         {
             memcpy(pubkey33,pindex->pubkey33,33);
             return;
@@ -780,7 +780,7 @@ int8_t komodo_minerid(int32_t height,uint8_t *pubkey33)
     int32_t num,i,numnotaries; CBlockIndex *pindex; uint32_t timestamp=0; uint8_t _pubkey33[33],pubkeys[64][33];
     if ( (pindex= chainActive[height]) != 0 )
     {
-        if ( (pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3) )
+        if ( pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3 || pindex->pubkey33[0] == 0xff )
         {
             if ( pubkey33 != 0 )
                 memcpy(pubkey33,pindex->pubkey33,33);
@@ -807,7 +807,7 @@ int32_t komodo_eligiblenotary(uint8_t pubkeys[66][33],int32_t *mids,int32_t *non
     {
         if ( (pindex= komodo_chainactive(height-i)) != 0 )
         {
-            if ( pindex->notaryid >= 0 && (pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3) )
+            if ( pindex->notaryid >= 0 && (pindex->pubkey33[0] == 2 || pindex->pubkey33[0] == 3 || pindex->pubkey33[0] == 0xff) )
             {
                 memcpy(pubkeys[i],pindex->pubkey33,33);
                 mids[i] = pindex->notaryid;
@@ -843,6 +843,7 @@ int32_t komodo_minerids(uint8_t *minerids,int32_t height,int32_t width) // depre
         minerids[i] = komodo_minerid(height - i,0);
     }
     return(n);*/
+    fprintf(stderr,"komodo_minerids is deprecated\n");
     return(-1);
 }
 
index 83c320ccbf2e55d10d8a93ad64d9a4c42f6104d2..884112cdec5f6c181d79073b447f0f5eed1436f8 100644 (file)
@@ -3507,7 +3507,7 @@ bool CheckBlockHeader(int32_t height,CBlockIndex *pindex, const CBlockHeader& bl
         return state.DoS(100, error("CheckBlockHeader(): Equihash solution invalid"),REJECT_INVALID, "invalid-solution");
     
     // Check proof of work matches claimed amount
-    komodo_index2pubkey33(pubkey33,pindex,height);
+    //komodo_index2pubkey33(pubkey33,pindex,height);
     if ( fCheckPOW && !CheckProofOfWork(height,pubkey33,blockhdr.GetHash(), blockhdr.nBits, Params().GetConsensus()) )
         return state.DoS(50, error("CheckBlockHeader(): proof of work failed"),REJECT_INVALID, "high-hash");
     return true;
index 2882360d0d8fa2a0d2338425e965a558d09e3cb9..dac141c64a5760ad56fa65dd7751f977fb9bd917 100644 (file)
@@ -146,7 +146,10 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
     if ( height > 34000 && ASSETCHAINS_SYMBOL[0] == 0 ) // 0 -> non-special notary
     {
         if ( (pindex= komodo_chainactive(height)) != 0 )
+        {
             komodo_pindex_init(pindex,height);
+            memcpy(pubkey33,pindex->pubkey33,33);
+        }
         special = komodo_chosennotary(&notaryid,height,pubkey33,timestamp);
         for (i=0; i<33; i++)
         {
This page took 0.034755 seconds and 4 git commands to generate.