mirror of
https://git.hush.is/hush/hush3.git
synced 2025-09-04 00:02:39 -04:00
commit
5e193eea72
@ -932,7 +932,7 @@ int32_t komodo_MoM(int32_t *notarized_heightp,uint256 *MoMp,uint256 *kmdtxidp,in
|
||||
memset(MoMp,0,sizeof(*MoMp));
|
||||
memset(kmdtxidp,0,sizeof(*kmdtxidp));
|
||||
*notarized_heightp = 0;
|
||||
if ( depth > 0 && notarized_ht > 0 && nHeight > notarized_ht-depth && nHeight <= notarized_ht )
|
||||
if ( depth != 0 && notarized_ht > 0 && nHeight > notarized_ht-depth && nHeight <= notarized_ht )
|
||||
{
|
||||
*MoMp = MoM;
|
||||
*notarized_heightp = notarized_ht;
|
||||
|
@ -45,6 +45,7 @@ bits256 iguana_merkle(bits256 *tree,int32_t txn_count)
|
||||
uint256 komodo_calcMoM(int32_t height,int32_t MoMdepth)
|
||||
{
|
||||
static uint256 zero; bits256 MoM,*tree; CBlockIndex *pindex; int32_t i;
|
||||
MoMdepth &= 0xffff;
|
||||
if ( MoMdepth >= height )
|
||||
return(zero);
|
||||
tree = (bits256 *)calloc(MoMdepth * 3,sizeof(*tree));
|
||||
|
@ -392,7 +392,7 @@ struct notarized_checkpoint *komodo_npptr(int32_t height)
|
||||
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 )
|
||||
if ( np->MoMdepth != 0 && height > np->notarized_height-(np->MoMdepth&0xffff) && height <= np->notarized_height )
|
||||
return(np);
|
||||
}
|
||||
}
|
||||
@ -447,7 +447,7 @@ int32_t komodo_MoMdata(int32_t *notarized_htp,uint256 *MoMp,uint256 *kmdtxidp,in
|
||||
*MoMoMdepthp = np->MoMoMdepth;
|
||||
*kmdstartip = np->kmdstarti;
|
||||
*kmdendip = np->kmdendi;
|
||||
return(np->MoMdepth);
|
||||
return(np->MoMdepth & 0xffff);
|
||||
}
|
||||
*notarized_htp = *MoMoMoffsetp = *MoMoMdepthp = *kmdstartip = *kmdendip = 0;
|
||||
memset(MoMp,0,sizeof(*MoMp));
|
||||
|
Loading…
x
Reference in New Issue
Block a user