This commit is contained in:
jl777
2018-09-10 08:07:10 -11:00
parent 2b404a3d4a
commit e0bea5459e
2 changed files with 6 additions and 2 deletions

View File

@@ -560,7 +560,9 @@ std::string GatewaysClaim(uint64_t txfee,uint256 bindtxid,std::string refcoin,ui
gatewayspk = GetUnspendable(cp,0);
_GetCCaddress(cp->unspendableaddr2,EVAL_ASSETS,gatewayspk);
memcpy(cp->unspendablepriv2,cp->CCpriv,32);
cp->evalcode2 = EVAL_ASSETS;
assetscp->evalcode2 = cp->evalcode2 = EVAL_ASSETS;
memcpy(assetscp->unspendablepriv2,cp->CCpriv,32);
strcpy(assets->unspendableaddr2,cp->unspendableaddr2);
if ( GetTransaction(bindtxid,tx,hashBlock,false) == 0 || (numvouts= tx.vout.size()) <= 0 )
{
fprintf(stderr,"cant find bindtxid %s\n",uint256_str(str,bindtxid));
@@ -581,9 +583,10 @@ std::string GatewaysClaim(uint64_t txfee,uint256 bindtxid,std::string refcoin,ui
fprintf(stderr,"invalid Gateways deposittxid %s %.8f != %.8f\n",uint256_str(str,deposittxid),(double)depositamount/COIN,(double)amount/COIN);
return("");
}
fprintf(stderr,"depositaddr.(%s) vs %s\n",depositaddr,cp->unspendableaddr2);
if ( AddNormalinputs(mtx,mypk,txfee,1) > 0 )
{
if ( (inputs= AddAssetInputs(cp,mtx,gatewayspk,assetid,amount,60)) > 0 )
if ( (inputs= AddAssetInputs(assetscp,mtx,gatewayspk,assetid,amount,60)) > 0 )
{
if ( inputs > amount )
CCchange = (inputs - amount);