Fix missing functionality
This commit is contained in:
@@ -399,30 +399,29 @@ int32_t komodo_notarized_height(uint256 *hashp,uint256 *txidp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32_t komodo_MoMdata(int32_t *notarized_htp,uint256 *MoMp,uint256 *kmdtxidp,int32_t height)
|
int32_t komodo_MoMdata(int32_t *notarized_htp,uint256 *MoMp,uint256 *kmdtxidp,int32_t height,uint256 *MoMoMp,int32_t *MoMoMoffsetp,int32_t *MoMoMdepthp,int32_t *kmdstartip,int32_t *kmdendip)
|
||||||
{
|
{
|
||||||
int32_t i; char symbol[KOMODO_ASSETCHAIN_MAXLEN],dest[KOMODO_ASSETCHAIN_MAXLEN]; struct komodo_state *sp; struct notarized_checkpoint *np = 0;
|
struct notarized_checkpoint *np = 0;
|
||||||
np = 0;
|
if ( (np= komodo_npptr(height)) != 0 )
|
||||||
if ( (sp= komodo_stateptr(symbol,dest)) != 0 )
|
|
||||||
{
|
{
|
||||||
for (i=sp->NUM_NPOINTS-1; i>=0; i--)
|
*notarized_htp = np->notarized_height;
|
||||||
{
|
*MoMp = np->MoM;
|
||||||
np = &sp->NPOINTS[i];
|
*kmdtxidp = np->notarized_desttxid;
|
||||||
if ( np->MoMdepth > 0 && height > np->notarized_height-np->MoMdepth && height <= np->notarized_height )
|
*MoMoMp = np->MoMoM;
|
||||||
{
|
*MoMoMoffsetp = np->MoMoMoffset;
|
||||||
*notarized_htp = np->notarized_height;
|
*MoMoMdepthp = np->MoMoMdepth;
|
||||||
*MoMp = np->MoM;
|
*kmdstartip = np->kmdstarti;
|
||||||
*kmdtxidp = np->notarized_desttxid;
|
*kmdendip = np->kmdendi;
|
||||||
return(np->MoMdepth);
|
return(np->MoMdepth);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
*notarized_htp = 0;
|
*notarized_htp = *MoMoMoffsetp = *MoMoMdepthp = *kmdstartip = *kmdendip = 0;
|
||||||
memset(MoMp,0,sizeof(*MoMp));
|
memset(MoMp,0,sizeof(*MoMp));
|
||||||
|
memset(MoMoMp,0,sizeof(*MoMoMp));
|
||||||
memset(kmdtxidp,0,sizeof(*kmdtxidp));
|
memset(kmdtxidp,0,sizeof(*kmdtxidp));
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *notarized_desttxidp)
|
int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *notarized_desttxidp)
|
||||||
{
|
{
|
||||||
struct notarized_checkpoint *np = 0; int32_t i=0,flag = 0; char symbol[KOMODO_ASSETCHAIN_MAXLEN],dest[KOMODO_ASSETCHAIN_MAXLEN]; struct komodo_state *sp;
|
struct notarized_checkpoint *np = 0; int32_t i=0,flag = 0; char symbol[KOMODO_ASSETCHAIN_MAXLEN],dest[KOMODO_ASSETCHAIN_MAXLEN]; struct komodo_state *sp;
|
||||||
|
|||||||
Reference in New Issue
Block a user