Chance for AssetConvert to validate

This commit is contained in:
jl777
2018-09-20 02:55:45 -11:00
parent 2884a3f64a
commit ff3116ce3c
4 changed files with 8 additions and 5 deletions

View File

@@ -261,9 +261,8 @@ std::string AssetConvert(int64_t txfee,uint256 assetid,std::vector<uint8_t> dest
{
if ( inputs > total )
CCchange = (inputs - total);
mtx.vout.push_back(MakeCC1vout(EVAL_ASSETS,CCchange,mypk));
mtx.vout.push_back(MakeCC1vout(evalcode,total,pubkey2pk(destpubkey)));
if ( CCchange != 0 )
mtx.vout.push_back(MakeCC1vout(EVAL_ASSETS,CCchange,mypk));
return(FinalizeCCTx(0,cp,mtx,mypk,txfee,EncodeAssetOpRet('t',assetid,zeroid,0,Mypubkey())));
} else fprintf(stderr,"not enough CC asset inputs for %.8f\n",(double)total/COIN);
}