diff --git a/src/cc/marmara.cpp b/src/cc/marmara.cpp index 17d1aa6c8..bf18c82aa 100644 --- a/src/cc/marmara.cpp +++ b/src/cc/marmara.cpp @@ -379,7 +379,7 @@ int64_t AddMarmarainputs(CMutableTransaction &mtx,std::vector &pubkeys, { if ( (funcid= DecodeMaramaraCoinbaseOpRet(tx.vout[numvouts-1].scriptPubKey,pk,ht,unlockht)) == 'C' || funcid == 'P' || funcid == 'L' ) { - char str[64]; fprintf(stderr,"(%s) %s/v%d %.8f ht.%d unlockht.%d\n",coinaddr,uint256_str(str,txid),vout,(double)it->second.satoshis/COIN,ht,unlockht); + //char str[64]; fprintf(stderr,"(%s) %s/v%d %.8f ht.%d unlockht.%d\n",coinaddr,uint256_str(str,txid),vout,(double)it->second.satoshis/COIN,ht,unlockht); if ( total != 0 && maxinputs != 0 ) { mtx.vin.push_back(CTxIn(txid,vout,CScript())); @@ -388,6 +388,8 @@ int64_t AddMarmarainputs(CMutableTransaction &mtx,std::vector &pubkeys, totalinputs += it->second.satoshis; vals.push_back(it->second.satoshis); n++; + if ( maxinputs != 0 && total == 0 ) + continue; if ( (total > 0 && totalinputs >= total) || (maxinputs > 0 && n >= maxinputs) ) break; } else fprintf(stderr,"null funcid\n"); @@ -395,7 +397,7 @@ int64_t AddMarmarainputs(CMutableTransaction &mtx,std::vector &pubkeys, } if ( maxinputs != 0 && total == 0 ) { - std::sort(vals.begin(), vals.end()); + std::sort(vals.begin(),vals.end()); totalinputs = 0; for (i=0; i