Return out

This commit is contained in:
jl777
2018-07-21 03:32:13 -11:00
parent 3c5300241e
commit 58875d2506
2 changed files with 4 additions and 5 deletions

View File

@@ -288,9 +288,10 @@ CC *MakeAssetCond(CPubKey pk)
CTxOut MakeAssetsVout(CAmount nValue,CPubKey pk)
{
CTxOut vout;
CTxOut vout; CScript scriptPubKey;
CC *payoutCond = MakeAssetCond(pk);
CTxOut(nValue,CCPubKey(payoutCond));
scriptPubKey = CCPubKey(payoutCond);
vout = CTxOut(nValue,scriptPubkey);
cc_free(payoutCond);
return(vout);
}
@@ -517,12 +518,10 @@ std::string FinalizeCCTx(uint8_t evalcode,CMutableTransaction &mtx,CPubKey mypk,
}
} else fprintf(stderr,"FinalizeCCTx couldnt find %s\n",mtx.vin[i].prevout.hash.ToString().c_str());
}
fprintf(stderr,"do cc_frees\n");
if ( mycond != 0 )
cc_free(mycond);
if ( othercond != 0 )
cc_free(othercond);
fprintf(stderr,"did cc_frees\n");
if ( totalinputs >= totaloutputs+2*txfee )
{
change = totalinputs - (totaloutputs+txfee);