Merge pull request #1227 from jl777/jl777
fix memory overflow in addnormalinputs
This commit is contained in:
@@ -471,7 +471,7 @@ int32_t CC_vinselect(int32_t *aboveip,int64_t *abovep,int32_t *belowip,int64_t *
|
|||||||
|
|
||||||
int64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,int64_t total,int32_t maxinputs)
|
int64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,int64_t total,int32_t maxinputs)
|
||||||
{
|
{
|
||||||
int32_t abovei,belowi,ind,vout,i,n = 0,maxutxos=64; int64_t sum,threshold,above,below; int64_t remains,nValue,totalinputs = 0; uint256 txid,hashBlock; std::vector<COutput> vecOutputs; CTransaction tx; struct CC_utxo *utxos,*up;
|
int32_t abovei,belowi,ind,vout,i,n = 0,maxutxos=CC_MAXVINS; int64_t sum,threshold,above,below; int64_t remains,nValue,totalinputs = 0; uint256 txid,hashBlock; std::vector<COutput> vecOutputs; CTransaction tx; struct CC_utxo *utxos,*up;
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
assert(pwalletMain != NULL);
|
assert(pwalletMain != NULL);
|
||||||
const CKeyStore& keystore = *pwalletMain;
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
@@ -564,7 +564,7 @@ int64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,int64_t total,int3
|
|||||||
|
|
||||||
int64_t AddNormalinputs2(CMutableTransaction &mtx,int64_t total,int32_t maxinputs)
|
int64_t AddNormalinputs2(CMutableTransaction &mtx,int64_t total,int32_t maxinputs)
|
||||||
{
|
{
|
||||||
int32_t abovei,belowi,ind,vout,i,n = 0,maxutxos=64; int64_t sum,threshold,above,below; int64_t remains,nValue,totalinputs = 0; char coinaddr[64]; uint256 txid,hashBlock; CTransaction tx; struct CC_utxo *utxos,*up;
|
int32_t abovei,belowi,ind,vout,i,n = 0,maxutxos=CC_MAXVINS; int64_t sum,threshold,above,below; int64_t remains,nValue,totalinputs = 0; char coinaddr[64]; uint256 txid,hashBlock; CTransaction tx; struct CC_utxo *utxos,*up;
|
||||||
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
||||||
utxos = (struct CC_utxo *)calloc(maxutxos,sizeof(*utxos));
|
utxos = (struct CC_utxo *)calloc(maxutxos,sizeof(*utxos));
|
||||||
threshold = total/(maxinputs+1);
|
threshold = total/(maxinputs+1);
|
||||||
|
|||||||
@@ -5390,6 +5390,8 @@ UniValue cclib(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("cclib method [evalcode] [JSON params]\n");
|
throw runtime_error("cclib method [evalcode] [JSON params]\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
method = (char *)params[0].get_str().c_str();
|
method = (char *)params[0].get_str().c_str();
|
||||||
if ( params.size() >= 2 )
|
if ( params.size() >= 2 )
|
||||||
{
|
{
|
||||||
@@ -5625,6 +5627,8 @@ UniValue marmara_poolpayout(const UniValue& params, bool fHelp)
|
|||||||
}
|
}
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
perc = atof(params[0].get_str().c_str()) / 100.;
|
perc = atof(params[0].get_str().c_str()) / 100.;
|
||||||
firstheight = atol(params[1].get_str().c_str());
|
firstheight = atol(params[1].get_str().c_str());
|
||||||
jsonstr = (char *)params[2].get_str().c_str();
|
jsonstr = (char *)params[2].get_str().c_str();
|
||||||
@@ -5643,6 +5647,8 @@ UniValue marmara_receive(const UniValue& params, bool fHelp)
|
|||||||
}
|
}
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
memset(&batontxid,0,sizeof(batontxid));
|
memset(&batontxid,0,sizeof(batontxid));
|
||||||
senderpub = ParseHex(params[0].get_str().c_str());
|
senderpub = ParseHex(params[0].get_str().c_str());
|
||||||
if (senderpub.size()!= 33)
|
if (senderpub.size()!= 33)
|
||||||
@@ -5672,6 +5678,8 @@ UniValue marmara_issue(const UniValue& params, bool fHelp)
|
|||||||
}
|
}
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
receiverpub = ParseHex(params[0].get_str().c_str());
|
receiverpub = ParseHex(params[0].get_str().c_str());
|
||||||
if (receiverpub.size()!= 33)
|
if (receiverpub.size()!= 33)
|
||||||
{
|
{
|
||||||
@@ -5701,6 +5709,8 @@ UniValue marmara_transfer(const UniValue& params, bool fHelp)
|
|||||||
ERR_RESULT("invalid receiverpub pubkey");
|
ERR_RESULT("invalid receiverpub pubkey");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
amount = atof(params[1].get_str().c_str()) * COIN + 0.00000000499999;
|
amount = atof(params[1].get_str().c_str()) * COIN + 0.00000000499999;
|
||||||
currency = params[2].get_str();
|
currency = params[2].get_str();
|
||||||
matures = atol(params[3].get_str().c_str());
|
matures = atol(params[3].get_str().c_str());
|
||||||
@@ -5719,6 +5729,8 @@ UniValue marmara_info(const UniValue& params, bool fHelp)
|
|||||||
}
|
}
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
firstheight = atol(params[0].get_str().c_str());
|
firstheight = atol(params[0].get_str().c_str());
|
||||||
lastheight = atol(params[1].get_str().c_str());
|
lastheight = atol(params[1].get_str().c_str());
|
||||||
minamount = atof(params[2].get_str().c_str()) * COIN + 0.00000000499999;
|
minamount = atof(params[2].get_str().c_str()) * COIN + 0.00000000499999;
|
||||||
@@ -5749,6 +5761,8 @@ UniValue marmara_creditloop(const UniValue& params, bool fHelp)
|
|||||||
}
|
}
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
txid = Parseuint256((char *)params[0].get_str().c_str());
|
txid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
result = MarmaraCreditloop(txid);
|
result = MarmaraCreditloop(txid);
|
||||||
return(result);
|
return(result);
|
||||||
@@ -5765,6 +5779,8 @@ UniValue marmara_settlement(const UniValue& params, bool fHelp)
|
|||||||
}
|
}
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
batontxid = Parseuint256((char *)params[0].get_str().c_str());
|
batontxid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
result = MarmaraSettlement(0,batontxid);
|
result = MarmaraSettlement(0,batontxid);
|
||||||
return(result);
|
return(result);
|
||||||
@@ -5777,6 +5793,8 @@ UniValue marmara_lock(const UniValue& params, bool fHelp)
|
|||||||
{
|
{
|
||||||
throw runtime_error("marmaralock amount unlockht\n");
|
throw runtime_error("marmaralock amount unlockht\n");
|
||||||
}
|
}
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
amount = atof(params[0].get_str().c_str()) * COIN + 0.00000000499999;
|
amount = atof(params[0].get_str().c_str()) * COIN + 0.00000000499999;
|
||||||
if ( params.size() == 2 )
|
if ( params.size() == 2 )
|
||||||
height = atol(params[1].get_str().c_str());
|
height = atol(params[1].get_str().c_str());
|
||||||
@@ -5790,6 +5808,8 @@ UniValue channelslist(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("channelsinfo\n");
|
throw runtime_error("channelsinfo\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
return(ChannelsList());
|
return(ChannelsList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5800,6 +5820,8 @@ UniValue channelsinfo(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("channelsinfo [opentxid]\n");
|
throw runtime_error("channelsinfo [opentxid]\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
opentxid=zeroid;
|
opentxid=zeroid;
|
||||||
if (params.size() > 0 && !params[0].isNull() && !params[0].get_str().empty())
|
if (params.size() > 0 && !params[0].isNull() && !params[0].get_str().empty())
|
||||||
opentxid = Parseuint256((char *)params[0].get_str().c_str());
|
opentxid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
@@ -6089,6 +6111,8 @@ UniValue rewardslist(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("rewardslist\n");
|
throw runtime_error("rewardslist\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
return(RewardsList());
|
return(RewardsList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6099,6 +6123,8 @@ UniValue rewardsinfo(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("rewardsinfo fundingtxid\n");
|
throw runtime_error("rewardsinfo fundingtxid\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
fundingtxid = Parseuint256((char *)params[0].get_str().c_str());
|
fundingtxid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
return(RewardsInfo(fundingtxid));
|
return(RewardsInfo(fundingtxid));
|
||||||
}
|
}
|
||||||
@@ -6109,6 +6135,8 @@ UniValue gatewayslist(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("gatewayslist\n");
|
throw runtime_error("gatewayslist\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
return(GatewaysList());
|
return(GatewaysList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6119,6 +6147,8 @@ UniValue gatewaysinfo(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("gatewaysinfo bindtxid\n");
|
throw runtime_error("gatewaysinfo bindtxid\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
txid = Parseuint256((char *)params[0].get_str().c_str());
|
txid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
return(GatewaysInfo(txid));
|
return(GatewaysInfo(txid));
|
||||||
}
|
}
|
||||||
@@ -6314,6 +6344,8 @@ UniValue gatewayspendingdeposits(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("gatewayspendingdeposits bindtxid coin\n");
|
throw runtime_error("gatewayspendingdeposits bindtxid coin\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
bindtxid = Parseuint256((char *)params[0].get_str().c_str());
|
bindtxid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
coin = params[1].get_str();
|
coin = params[1].get_str();
|
||||||
return(GatewaysPendingDeposits(bindtxid,coin));
|
return(GatewaysPendingDeposits(bindtxid,coin));
|
||||||
@@ -6326,6 +6358,8 @@ UniValue gatewayspendingwithdraws(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("gatewayspendingwithdraws bindtxid coin\n");
|
throw runtime_error("gatewayspendingwithdraws bindtxid coin\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
bindtxid = Parseuint256((char *)params[0].get_str().c_str());
|
bindtxid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
coin = params[1].get_str();
|
coin = params[1].get_str();
|
||||||
return(GatewaysPendingWithdraws(bindtxid,coin));
|
return(GatewaysPendingWithdraws(bindtxid,coin));
|
||||||
@@ -6338,6 +6372,8 @@ UniValue gatewaysprocessed(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("gatewaysprocessed bindtxid coin\n");
|
throw runtime_error("gatewaysprocessed bindtxid coin\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
bindtxid = Parseuint256((char *)params[0].get_str().c_str());
|
bindtxid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
coin = params[1].get_str();
|
coin = params[1].get_str();
|
||||||
return(GatewaysProcessedWithdraws(bindtxid,coin));
|
return(GatewaysProcessedWithdraws(bindtxid,coin));
|
||||||
@@ -6349,6 +6385,8 @@ UniValue oracleslist(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("oracleslist\n");
|
throw runtime_error("oracleslist\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
return(OraclesList());
|
return(OraclesList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6359,6 +6397,8 @@ UniValue oraclesinfo(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("oraclesinfo oracletxid\n");
|
throw runtime_error("oraclesinfo oracletxid\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
txid = Parseuint256((char *)params[0].get_str().c_str());
|
txid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
return(OracleInfo(txid));
|
return(OracleInfo(txid));
|
||||||
}
|
}
|
||||||
@@ -6414,6 +6454,8 @@ UniValue oraclessamples(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("oraclessamples oracletxid batonutxo num\n");
|
throw runtime_error("oraclessamples oracletxid batonutxo num\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
txid = Parseuint256((char *)params[0].get_str().c_str());
|
txid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
batontxid = Parseuint256((char *)params[1].get_str().c_str());
|
batontxid = Parseuint256((char *)params[1].get_str().c_str());
|
||||||
num = atoi((char *)params[2].get_str().c_str());
|
num = atoi((char *)params[2].get_str().c_str());
|
||||||
@@ -6931,6 +6973,8 @@ UniValue tokeninfo(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("tokeninfo tokenid\n");
|
throw runtime_error("tokeninfo tokenid\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
tokenid = Parseuint256((char *)params[0].get_str().c_str());
|
tokenid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
return(TokenInfo(tokenid));
|
return(TokenInfo(tokenid));
|
||||||
}
|
}
|
||||||
@@ -6942,6 +6986,8 @@ UniValue tokenorders(const UniValue& params, bool fHelp)
|
|||||||
throw runtime_error("tokenorders [tokenid]\n");
|
throw runtime_error("tokenorders [tokenid]\n");
|
||||||
if ( ensure_CCrequirements() < 0 )
|
if ( ensure_CCrequirements() < 0 )
|
||||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
|
const CKeyStore& keystore = *pwalletMain;
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
if (params.size() == 1) {
|
if (params.size() == 1) {
|
||||||
tokenid = Parseuint256((char *)params[0].get_str().c_str());
|
tokenid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
if (tokenid == zeroid)
|
if (tokenid == zeroid)
|
||||||
|
|||||||
Reference in New Issue
Block a user