Test
This commit is contained in:
@@ -42,7 +42,7 @@ bits256 iguana_merkle(bits256 *tree,int32_t txn_count)
|
||||
return(tree[n]);
|
||||
}
|
||||
|
||||
struct komodo_ccdata_entry *komodo_allMoMs(int32_t *nump,uint256 *MoMoMp,int32_t *MoMoMdepthp,int32_t kmdstarti,int32_t kmdendi)
|
||||
struct komodo_ccdata_entry *komodo_allMoMs(int32_t *nump,uint256 *MoMoMp,int32_t kmdstarti,int32_t kmdendi)
|
||||
{
|
||||
struct komodo_ccdata_entry *allMoMs=0; bits256 *tree,tmp; struct komodo_ccdata *ccdata,*tmpptr; int32_t i,num,max;
|
||||
num = max = 0;
|
||||
|
||||
@@ -592,8 +592,6 @@ UniValue kvsearch(const UniValue& params, bool fHelp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct komodo_ccdata_entry { uint256 MoM; int32_t notarized_height,height,txi; char symbol[65]; };
|
||||
|
||||
UniValue allMoMs(const UniValue& params, bool fHelp)
|
||||
{
|
||||
struct komodo_ccdata_entry *allMoMs; uint256 MoMoM; int32_t num,i,kmdstarti,kmdendi; UniValue ret(UniValue::VOBJ); UniValue a(UniValue::VARR);
|
||||
@@ -604,19 +602,21 @@ UniValue allMoMs(const UniValue& params, bool fHelp)
|
||||
kmdendi = atoi(params[1].get_str().c_str());
|
||||
ret.push_back(Pair("kmdstarti",kmdstarti));
|
||||
ret.push_back(Pair("kmdendi",kmdendi));
|
||||
if ( (allMoMs= komodo_allMoMs(&num,&MoMoM,&MoMoMdepth,kmdstarti,kmdendi)) != 0 )
|
||||
if ( (allMoMs= komodo_allMoMs(&num,&MoMoM,kmdstarti,kmdendi)) != 0 )
|
||||
{
|
||||
for (i=0; i<num; i++)
|
||||
{
|
||||
UniValue item(UniValue::VOBJ);
|
||||
item.push_back(Pair("MoM",allMoMs[i].ToString()));
|
||||
item.push_back(Pair("MoM",allMoMs[i].MoM.ToString()));
|
||||
item.push_back(Pair("coin",allMoMs[i].symbol));
|
||||
item.push_back(Pair("notarized_height",allMoMs[i].notarized_height));
|
||||
item.push_back(Pair("kmdheight",allMoMs[i].kmdheight));
|
||||
item.push_back(Pair("txi",allMoMs[i].txi));
|
||||
a.push_back(item);
|
||||
}
|
||||
ret.push_back(Pair("MoMs",a));
|
||||
ret.push_back(Pair("MoMoM",MoMoM.ToString()));
|
||||
ret.push_back(Pair("MoMoMdepth",(int)MoMoMdepth));
|
||||
ret.push_back(Pair("MoMoMdepth",(int)num));
|
||||
free(allMoMs);
|
||||
}
|
||||
return(ret);
|
||||
|
||||
Reference in New Issue
Block a user