Test
This commit is contained in:
@@ -526,9 +526,9 @@ char *bitcoin_address(char *coinaddr,uint8_t addrtype,uint8_t *pubkey_or_rmd160,
|
||||
int32_t komodo_minerids(uint8_t *minerids,int32_t height,int32_t width);
|
||||
int32_t komodo_kvsearch(uint256 *refpubkeyp,int32_t current_height,uint32_t *flagsp,int32_t *heightp,uint8_t value[IGUANA_MAXSCRIPTSIZE],uint8_t *key,int32_t keylen);
|
||||
|
||||
UniValue kvsearch(const Array& params, bool fHelp)
|
||||
UniValue kvsearch(const UniValue& params, bool fHelp)
|
||||
{
|
||||
Object ret; uint32_t flags; uint8_t value[IGUANA_MAXSCRIPTSIZE],key[IGUANA_MAXSCRIPTSIZE]; int32_t duration,j,height,valuesize,keylen; uint256 refpubkey; static uint256 zeroes;
|
||||
UniValue ret(UniValue::VOBJ); uint32_t flags; uint8_t value[IGUANA_MAXSCRIPTSIZE],key[IGUANA_MAXSCRIPTSIZE]; int32_t duration,j,height,valuesize,keylen; uint256 refpubkey; static uint256 zeroes;
|
||||
if (fHelp || params.size() != 1 )
|
||||
throw runtime_error("kvsearch key");
|
||||
LOCK(cs_main);
|
||||
@@ -561,9 +561,9 @@ UniValue kvsearch(const Array& params, bool fHelp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
UniValue minerids(const Array& params, bool fHelp)
|
||||
UniValue minerids(const UniValue& params, bool fHelp)
|
||||
{
|
||||
Object ret; Array a; uint8_t minerids[2000],pubkeys[65][33]; int32_t i,j,n,numnotaries,tally[129];
|
||||
UniValue ret(UniValue::VOBJ); Array a; uint8_t minerids[2000],pubkeys[65][33]; int32_t i,j,n,numnotaries,tally[129];
|
||||
if ( fHelp || params.size() != 1 )
|
||||
throw runtime_error("minerids needs height\n");
|
||||
LOCK(cs_main);
|
||||
@@ -612,9 +612,9 @@ UniValue minerids(const Array& params, bool fHelp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
UniValue notaries(const Array& params, bool fHelp)
|
||||
UniValue notaries(const UniValue& params, bool fHelp)
|
||||
{
|
||||
Array a; Object ret; int32_t i,j,n,m; char *hexstr; uint8_t pubkeys[64][33]; char btcaddr[64],kmdaddr[64],*ptr;
|
||||
Array a; UniValue ret(UniValue::VOBJ); int32_t i,j,n,m; char *hexstr; uint8_t pubkeys[64][33]; char btcaddr[64],kmdaddr[64],*ptr;
|
||||
if ( fHelp || params.size() != 1 )
|
||||
throw runtime_error("notaries height\n");
|
||||
LOCK(cs_main);
|
||||
@@ -664,9 +664,9 @@ int32_t komodo_pending_withdraws(char *opretstr);
|
||||
int32_t pax_fiatstatus(uint64_t *available,uint64_t *deposited,uint64_t *issued,uint64_t *withdrawn,uint64_t *approved,uint64_t *redeemed,char *base);
|
||||
extern char CURRENCIES[][8];
|
||||
|
||||
UniValue paxpending(const Array& params, bool fHelp)
|
||||
UniValue paxpending(const UniValue& params, bool fHelp)
|
||||
{
|
||||
Object ret; Array a; char opretbuf[10000*2]; int32_t opretlen,baseid; uint64_t available,deposited,issued,withdrawn,approved,redeemed;
|
||||
UniValue ret(UniValue::VOBJ); Array a; char opretbuf[10000*2]; int32_t opretlen,baseid; uint64_t available,deposited,issued,withdrawn,approved,redeemed;
|
||||
if ( fHelp || params.size() != 0 )
|
||||
throw runtime_error("paxpending needs no args\n");
|
||||
LOCK(cs_main);
|
||||
@@ -695,12 +695,12 @@ UniValue paxpending(const Array& params, bool fHelp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
UniValue paxprice(const Array& params, bool fHelp)
|
||||
UniValue paxprice(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if ( fHelp || params.size() > 4 || params.size() < 2 )
|
||||
throw runtime_error("paxprice \"base\" \"rel\" height\n");
|
||||
LOCK(cs_main);
|
||||
Object ret; uint64_t basevolume=0,relvolume,seed;
|
||||
UniValue ret(UniValue::VOBJ); uint64_t basevolume=0,relvolume,seed;
|
||||
std::string base = params[0].get_str();
|
||||
std::string rel = params[1].get_str();
|
||||
int32_t height;
|
||||
@@ -734,12 +734,12 @@ UniValue paxprice(const Array& params, bool fHelp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
UniValue paxprices(const Array& params, bool fHelp)
|
||||
UniValue paxprices(const UniValue& params, bool fHelp)
|
||||
{
|
||||
if ( fHelp || params.size() != 3 )
|
||||
throw runtime_error("paxprices \"base\" \"rel\" maxsamples\n");
|
||||
LOCK(cs_main);
|
||||
Object ret; uint64_t relvolume,prices[4096]; uint32_t i,n; int32_t heights[sizeof(prices)/sizeof(*prices)];
|
||||
UniValue ret(UniValue::VOBJ); uint64_t relvolume,prices[4096]; uint32_t i,n; int32_t heights[sizeof(prices)/sizeof(*prices)];
|
||||
std::string base = params[0].get_str();
|
||||
std::string rel = params[1].get_str();
|
||||
int32_t maxsamples = atoi(params[2].get_str().c_str());
|
||||
|
||||
@@ -492,10 +492,10 @@ int32_t komodo_kvduration(uint32_t flags);
|
||||
uint256 komodo_kvprivkey(uint256 *pubkeyp,char *passphrase);
|
||||
int32_t komodo_kvsigverify(uint8_t *buf,int32_t len,uint256 _pubkey,uint256 sig);
|
||||
|
||||
UniValue kvupdate(const Array& params, bool fHelp)
|
||||
UniValue kvupdate(const UniValue& params, bool fHelp)
|
||||
{
|
||||
static uint256 zeroes;
|
||||
CWalletTx wtx; Object ret;
|
||||
CWalletTx wtx; UniValue ret(UniValue::VOBJ);
|
||||
uint8_t keyvalue[IGUANA_MAXSCRIPTSIZE],opretbuf[IGUANA_MAXSCRIPTSIZE]; int32_t i,coresize,haveprivkey,duration,opretlen,height; uint16_t keylen=0,valuesize=0,refvaluesize=0; uint8_t *key,*value=0; uint32_t flags,tmpflags,n; struct komodo_kv *ptr; uint64_t fee; uint256 privkey,pubkey,refpubkey,sig;
|
||||
if (fHelp || params.size() < 3 )
|
||||
throw runtime_error("kvupdate key value flags/passphrase");
|
||||
@@ -608,7 +608,7 @@ UniValue kvupdate(const Array& params, bool fHelp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
UniValue paxdeposit(const Array& params, bool fHelp)
|
||||
UniValue paxdeposit(const UniValue& params, bool fHelp)
|
||||
{
|
||||
uint64_t available,deposited,issued,withdrawn,approved,redeemed,seed,komodoshis = 0; int32_t height; char destaddr[64]; uint8_t i,pubkey37[33];
|
||||
bool fSubtractFeeFromAmount = false;
|
||||
@@ -650,7 +650,7 @@ UniValue paxdeposit(const Array& params, bool fHelp)
|
||||
return wtx.GetHash().GetHex();
|
||||
}
|
||||
|
||||
UniValue paxwithdraw(const Array& params, bool fHelp)
|
||||
UniValue paxwithdraw(const UniValue& params, bool fHelp)
|
||||
{
|
||||
CWalletTx wtx; std::string dest; int32_t kmdheight; uint64_t seed,komodoshis = 0; char destaddr[64]; uint8_t i,pubkey37[37]; bool fSubtractFeeFromAmount = false;
|
||||
if ( ASSETCHAINS_SYMBOL[0] == 0 )
|
||||
|
||||
Reference in New Issue
Block a user