Browse Source

Test

pull/4/head
jl777 6 years ago
parent
commit
252031d2a3
  1. 15
      src/komodo_notary.h
  2. 4
      src/komodo_structs.h

15
src/komodo_notary.h

@ -399,6 +399,21 @@ int32_t komodo_notarized_height(uint256 *hashp,uint256 *txidp)
}
struct notarized_checkpoint *komodo_npptr(int32_t height)
{
char symbol[KOMODO_ASSETCHAIN_MAXLEN],dest[KOMODO_ASSETCHAIN_MAXLEN]; int32_t i; struct komodo_state *sp; struct notarized_checkpoint *np = 0;
if ( (sp= komodo_stateptr(symbol,dest)) != 0 )
{
for (i=sp->NUM_NPOINTS-1; i>=0; i--)
{
np = &sp->NPOINTS[i];
if ( np->MoMdepth > 0 && height > np->notarized_height-np->MoMdepth && height <= np->notarized_height )
return(np);
}
}
return(0);
}
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)
{
struct notarized_checkpoint *np = 0;

4
src/komodo_structs.h

@ -85,8 +85,8 @@ struct knotary_entry { UT_hash_handle hh; uint8_t pubkey[33],notaryid; };
struct knotaries_entry { int32_t height,numnotaries; struct knotary_entry *Notaries; };
struct notarized_checkpoint
{
uint256 notarized_hash,notarized_desttxid,MoM;
int32_t nHeight,notarized_height,MoMdepth;
uint256 notarized_hash,notarized_desttxid,MoM,MoMoM;
int32_t nHeight,notarized_height,MoMdepth,MoMoMdepth,MoMoMoffset,kmdstarti,kmdendi;
};
struct komodo_state

Loading…
Cancel
Save