Test
This commit is contained in:
@@ -93,6 +93,7 @@ bool SetAssetFillamounts(int32_t sellflag,uint64_t &received_nValue,uint64_t &re
|
|||||||
if ( unitprice > 0 && (received_nValue= (paidunits * unitprice)/COIN) > 0 && received_nValue < orig_nValue )
|
if ( unitprice > 0 && (received_nValue= (paidunits * unitprice)/COIN) > 0 && received_nValue < orig_nValue )
|
||||||
{
|
{
|
||||||
remaining_nValue = (orig_nValue - received_nValue);
|
remaining_nValue = (orig_nValue - received_nValue);
|
||||||
|
printf("total.%llu 0 paid.%llu, remaining %llu <- %llu (%llu - %llu)\n",(long long)totalunits,(long long)paidunits,(long long)remaining_nValue,(long long)(orig_nValue - received_nValue),(long long)orig_nValue,(long long)received_nValue)
|
||||||
return(ValidateAssetRemainder(sellflag,remaining_price,remaining_nValue,orig_nValue,received_nValue,paidunits,totalunits));
|
return(ValidateAssetRemainder(sellflag,remaining_price,remaining_nValue,orig_nValue,received_nValue,paidunits,totalunits));
|
||||||
} else return(false);
|
} else return(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ std::string FillSell(uint64_t txfee,uint256 assetid,uint256 assetid2,uint256 ask
|
|||||||
if ( inputs > 0 )
|
if ( inputs > 0 )
|
||||||
{
|
{
|
||||||
SetAssetFillamounts(1,paid_amount,remaining_required,askamount,fillamount,totalunits);
|
SetAssetFillamounts(1,paid_amount,remaining_required,askamount,fillamount,totalunits);
|
||||||
if ( assetid2 == zeroid && inputs > fillamount )
|
if ( assetid2 != zeroid && inputs > fillamount )
|
||||||
CCchange = (inputs - fillamount);
|
CCchange = (inputs - fillamount);
|
||||||
mtx.vout.push_back(MakeCC1vout(EVAL_ASSETS,askamount - paid_amount,GetUnspendable(cp,0)));
|
mtx.vout.push_back(MakeCC1vout(EVAL_ASSETS,askamount - paid_amount,GetUnspendable(cp,0)));
|
||||||
mtx.vout.push_back(MakeCC1vout(EVAL_ASSETS,paid_amount,mypk));
|
mtx.vout.push_back(MakeCC1vout(EVAL_ASSETS,paid_amount,mypk));
|
||||||
|
|||||||
Reference in New Issue
Block a user