This commit is contained in:
@@ -388,14 +388,14 @@ int64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,int64_t total,int3
|
|||||||
remains -= up->nValue;
|
remains -= up->nValue;
|
||||||
utxos[ind] = utxos[--n];
|
utxos[ind] = utxos[--n];
|
||||||
memset(&utxos[n],0,sizeof(utxos[n]));
|
memset(&utxos[n],0,sizeof(utxos[n]));
|
||||||
fprintf(stderr,"totalinputs %.8f vs total %.8f i.%d vs max.%d\n",(double)totalinputs/COIN,(double)total/COIN,i,maxinputs);
|
//fprintf(stderr,"totalinputs %.8f vs total %.8f i.%d vs max.%d\n",(double)totalinputs/COIN,(double)total/COIN,i,maxinputs);
|
||||||
if ( totalinputs >= total || (i+1) >= maxinputs )
|
if ( totalinputs >= total || (i+1) >= maxinputs )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
free(utxos);
|
free(utxos);
|
||||||
if ( totalinputs >= total )
|
if ( totalinputs >= total )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"return totalinputs %.8f\n",(double)totalinputs/COIN);
|
//fprintf(stderr,"return totalinputs %.8f\n",(double)totalinputs/COIN);
|
||||||
return(totalinputs);
|
return(totalinputs);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ static uint256 myIs_baton_spentinmempool(uint256 batontxid,int32_t batonvout)
|
|||||||
if ( tx.vout.size() > 0 && tx.vin.size() > 1 && batontxid == tx.vin[1].prevout.hash && batonvout == tx.vin[1].prevout.n )
|
if ( tx.vout.size() > 0 && tx.vin.size() > 1 && batontxid == tx.vin[1].prevout.hash && batonvout == tx.vin[1].prevout.n )
|
||||||
{
|
{
|
||||||
const uint256 &txid = tx.GetHash();
|
const uint256 &txid = tx.GetHash();
|
||||||
char str[65]; fprintf(stderr,"found baton spent in mempool %s\n",uint256_str(str,txid));
|
//char str[65]; fprintf(stderr,"found baton spent in mempool %s\n",uint256_str(str,txid));
|
||||||
return(txid);
|
return(txid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -669,7 +669,7 @@ int64_t AddOracleInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPub
|
|||||||
{
|
{
|
||||||
txid = it->first.txhash;
|
txid = it->first.txhash;
|
||||||
vout = (int32_t)it->first.index;
|
vout = (int32_t)it->first.index;
|
||||||
char str[65]; fprintf(stderr,"oracle check %s/v%d\n",uint256_str(str,txid),vout);
|
//char str[65]; fprintf(stderr,"oracle check %s/v%d\n",uint256_str(str,txid),vout);
|
||||||
if ( GetTransaction(txid,vintx,hashBlock,false) != 0 )
|
if ( GetTransaction(txid,vintx,hashBlock,false) != 0 )
|
||||||
{
|
{
|
||||||
// get valid CC payments
|
// get valid CC payments
|
||||||
|
|||||||
Reference in New Issue
Block a user