Require tokenid for remaining
This commit is contained in:
@@ -426,7 +426,7 @@ UniValue GatewaysInfo(uint256 bindtxid)
|
||||
result.push_back(Pair("tokenid",uint256_str(str,tokenid)));
|
||||
sprintf(numstr,"%.8f",(double)totalsupply/COIN);
|
||||
result.push_back(Pair("totalsupply",numstr));
|
||||
remaining = CCaddress_balance(gatewaysassets);
|
||||
remaining = CCtoken_balance(gatewaysassets,tokenid);
|
||||
sprintf(numstr,"%.8f",(double)remaining/COIN);
|
||||
result.push_back(Pair("remaining",numstr));
|
||||
sprintf(numstr,"%.8f",(double)(totalsupply - remaining)/COIN);
|
||||
|
||||
@@ -477,7 +477,7 @@ int32_t gettxout_scriptPubKey(uint8_t *scriptPubKey,int32_t maxsize,uint256 txid
|
||||
uint256 hashBlock;
|
||||
if ( GetTransaction(txid,tx,hashBlock,false) == 0 )
|
||||
return(-1);
|
||||
else if ( n <= tx.vout.size() ) // vout.size() seems off by 1
|
||||
else if ( n < tx.vout.size() )
|
||||
{
|
||||
ptr = (uint8_t *)tx.vout[n].scriptPubKey.data();
|
||||
m = tx.vout[n].scriptPubKey.size();
|
||||
|
||||
Reference in New Issue
Block a user