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

index f5e8a670794bb6d32fda06466f9542a460210077..2e6776bfb87cfffffa71ba6d37a669fad2b51d93 100644 (file)
@@ -662,7 +662,9 @@ int32_t komodo_block2height(CBlock *block)
 void komodo_block2pubkey33(uint8_t *pubkey33,CBlock& block)
 {
     int32_t n;
-    memset(pubkey33,0xff,33);
+    if ( KOMODO_LOADINGBLOCKS == 0 )
+        memset(pubkey33,0xff,33);
+    else memset(pubkey33,0,33);
     if ( block.vtx[0].vout.size() > 0 )
     {
 #ifdef KOMODO_ZCASH
@@ -732,9 +734,9 @@ void komodo_pindex_init(CBlockIndex *pindex,int32_t height)
     pindex->notaryid = -1;
     if ( pindex->pubkey33[0] != 2 && pindex->pubkey33[0] != 3 && pindex->pubkey33[0] != 0xff )
     {
-        //if ( KOMODO_LOADINGBLOCKS == 0 )
+        if ( KOMODO_LOADINGBLOCKS == 0 )
             memset(pindex->pubkey33,0xff,33);
-        //else memset(pindex->pubkey33,0,33);
+        else memset(pindex->pubkey33,0,33);
         if ( komodo_blockload(block,pindex) == 0 )
         {
             komodo_block2pubkey33(pindex->pubkey33,block);
index b6c7d2b31ebb2aa3b87fca132175cdf0a4124931..1984c33a7769889be17b1eb2889d725b6c4b5f2e 100644 (file)
@@ -146,6 +146,8 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
     }
     if ( height > 34000 && ASSETCHAINS_SYMBOL[0] == 0 ) // 0 -> non-special notary
     {
+        if ( KOMODO_LOADINGBLOCKS == 0 )
+            return(true);
         if ( (pindex= komodo_chainactive(height)) != 0 )
         {
             komodo_pindex_init(pindex,height);
@@ -206,8 +208,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
         for (i=0; i<66; i++)
             printf("%d ",mids[i]);
         printf(" minerids from ht.%d pindex.%p\n",height,pindex);
-        if ( KOMODO_LOADINGBLOCKS == 0 )
-            return false;
+        return false;
     }
     return true;
 }
This page took 0.030349 seconds and 4 git commands to generate.