Test
This commit is contained in:
@@ -128,10 +128,10 @@ bool SetAskFillamounts(uint64_t &received_assetoshis,uint64_t &remaining_nValue,
|
|||||||
"totalrequired": "1000.00000000",
|
"totalrequired": "1000.00000000",
|
||||||
"price": "100.00000000"
|
"price": "100.00000000"
|
||||||
},*/
|
},*/
|
||||||
unitprice = (double)(total_nValue * COIN) / orig_assetoshis;
|
unitprice = (total_nValue / orig_assetoshis);
|
||||||
received_assetoshis = (paid_nValue * COIN) / unitprice;
|
received_assetoshis = (paid_nValue / unitprice);
|
||||||
fprintf(stderr,"remaining_nValue %llu (%llu - %llu)\n",(long long)remaining_nValue,(long long)total_nValue,(long long)paid_nValue);
|
fprintf(stderr,"remaining_nValue %.8f (%.8f - %.8f)\n",(double)remaining_nValue/COIN,(double)total_nValue/COIN,(double)paid_nValue/COIN);
|
||||||
fprintf(stderr,"unitprice %llu received_assetoshis %llu orig %llu\n",(long long)unitprice,(long long)received_assetoshis,(long long)orig_assetoshis);
|
fprintf(stderr,"unitprice %.8f received_assetoshis %llu orig %llu\n",(double)unitprice/COIN,(long long)received_assetoshis,(long long)orig_assetoshis);
|
||||||
if ( unitprice > 0 && received_assetoshis > 0 && received_assetoshis <= orig_assetoshis )
|
if ( unitprice > 0 && received_assetoshis > 0 && received_assetoshis <= orig_assetoshis )
|
||||||
{
|
{
|
||||||
remaining_assetoshis = (orig_assetoshis - received_assetoshis);
|
remaining_assetoshis = (orig_assetoshis - received_assetoshis);
|
||||||
|
|||||||
Reference in New Issue
Block a user