]> Git Repo - VerusCoin.git/commitdiff
Test
authorjl777 <[email protected]>
Fri, 1 Jun 2018 17:54:14 +0000 (06:54 -1100)
committerjl777 <[email protected]>
Fri, 1 Jun 2018 17:54:14 +0000 (06:54 -1100)
src/wallet/rpcwallet.cpp

index bac222f639d8655f5cfe1037f824da31b53f66fb..b09e656b8105e23d80cae96aed46a87a18718b5b 100644 (file)
@@ -4550,7 +4550,7 @@ int32_t komodo_notaryvin(CMutableTransaction &txNew,uint8_t *notarypub33)
 
 int32_t komodo_staked(CMutableTransaction &txNew,uint32_t nBits,uint32_t *blocktimep,uint32_t *txtimep,uint256 *utxotxidp,int32_t *utxovoutp,uint64_t *utxovaluep,uint8_t *utxosig)
 {
-    set<CBitcoinAddress> setAddress;  int32_t i,siglen=0,nMinDepth = 1,nMaxDepth = 9999999; vector<COutput> vecOutputs; uint32_t eligible,earliest = 0; CScript best_scriptPubKey; arith_uint256 bnTarget; bool fNegative,fOverflow;
+    set<CBitcoinAddress> setAddress;  int32_t i,siglen=0,nMinDepth = 1,nMaxDepth = 99999999; vector<COutput> vecOutputs; uint32_t eligible,earliest = 0; CScript best_scriptPubKey; arith_uint256 bnTarget; bool fNegative,fOverflow;
     bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
     assert(pwalletMain != NULL);
     LOCK2(cs_main, pwalletMain->cs_wallet);
@@ -4562,14 +4562,23 @@ int32_t komodo_staked(CMutableTransaction &txNew,uint32_t nBits,uint32_t *blockt
     BOOST_FOREACH(const COutput& out, vecOutputs)
     {
         if ( out.nDepth < nMinDepth || out.nDepth > nMaxDepth )
+        {
+            fprintf(stderr,"komodo_staked invalid depth %d\n",(int32_t)out.nDepth);
             continue;
+        }
         if ( setAddress.size() )
         {
             CTxDestination address;
             if (!ExtractDestination(out.tx->vout[out.i].scriptPubKey, address))
+            {
+                fprintf(stderr,"komodo_staked ExtractDestination error\n");
                 continue;
+            }
             if (!setAddress.count(address))
+            {
+                fprintf(stderr,"komodo_staked setAddress.count error\n");
                 continue;
+            }
         }
         CAmount nValue = out.tx->vout[out.i].nValue;
         const CScript& pk = out.tx->vout[out.i].scriptPubKey;
@@ -4602,8 +4611,8 @@ int32_t komodo_staked(CMutableTransaction &txNew,uint32_t nBits,uint32_t *blockt
                     *txtimep = (uint32_t)out.tx->nLockTime;
                     fprintf(stderr,"earliest.%u [%d] (%s) nValue %.8f locktime.%u\n",earliest,(int32_t)(earliest- *blocktimep),CBitcoinAddress(address).ToString().c_str(),(double)nValue/COIN,*txtimep);
                 }
-            }
-        }
+            } else fprintf(stderr,"%s not eligible\n",out.tx->GetHash().c_str());
+        } else fprintf(stderr,"no tipindex\n");
     }
     if ( earliest != 0 )
     {
This page took 0.025785 seconds and 4 git commands to generate.