Test
This commit is contained in:
@@ -106,7 +106,7 @@ UniValue AssetList()
|
|||||||
UniValue AssetOrders(uint256 refassetid)
|
UniValue AssetOrders(uint256 refassetid)
|
||||||
{
|
{
|
||||||
static uint256 zero;
|
static uint256 zero;
|
||||||
int64_t price; uint256 txid,hashBlock,assetid,assetid2,bettxid; std::vector<uint8_t> origpubkey; CTransaction vintx; UniValue result(UniValue::VARR); std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs; int32_t leverage; uint8_t funcid; char numstr[32],funcidstr[16],origaddr[64],assetidstr[65]; struct CCcontract_info *cp,C;
|
int64_t price; uint256 txid,hashBlock,assetid,assetid2; std::vector<uint8_t> origpubkey; CTransaction vintx; UniValue result(UniValue::VARR); std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs; uint8_t funcid; char numstr[32],funcidstr[16],origaddr[64],assetidstr[65]; struct CCcontract_info *cp,C;
|
||||||
cp = CCinit(&C,EVAL_ASSETS);
|
cp = CCinit(&C,EVAL_ASSETS);
|
||||||
SetCCunspents(unspentOutputs,(char *)cp->unspendableCCaddr);
|
SetCCunspents(unspentOutputs,(char *)cp->unspendableCCaddr);
|
||||||
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
|
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++)
|
||||||
@@ -114,7 +114,7 @@ UniValue AssetOrders(uint256 refassetid)
|
|||||||
txid = it->first.txhash;
|
txid = it->first.txhash;
|
||||||
if ( GetTransaction(txid,vintx,hashBlock,false) != 0 )
|
if ( GetTransaction(txid,vintx,hashBlock,false) != 0 )
|
||||||
{
|
{
|
||||||
if ( vintx.vout.size() > 0 && (funcid= DecodeAssetOpRet(vintx.vout[vintx.vout.size()-1].scriptPubKey,assetid,assetid2,price,origpubkey,bettxid,leverage)) != 0 )
|
if ( vintx.vout.size() > 0 && (funcid= DecodeAssetOpRet(vintx.vout[vintx.vout.size()-1].scriptPubKey,assetid,assetid2,price,origpubkey)) != 0 )
|
||||||
{
|
{
|
||||||
if ( refassetid != zero && assetid != refassetid )
|
if ( refassetid != zero && assetid != refassetid )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user