Browse Source

try suppress again

blackjok3r
blackjok3r 7 years ago
parent
commit
d9060206af
  1. 2
      iguana/dpow/dpow_rpc.c
  2. 13
      iguana/iguana_notary.c

2
iguana/dpow/dpow_rpc.c

@ -289,7 +289,7 @@ int32_t dpow_paxpending(struct supernet_info *myinfo,uint8_t *hex,int32_t hexsiz
MoMdepth = (MoMdepth & 0xffff) | ((uint32_t)CCid<<16);
n += iguana_rwnum(1,&hex[n],sizeof(MoMdepth),(uint32_t *)&MoMdepth);
//( )
if ( ( (strncmp(bp->srccoin->symbol, "STKE", 4) == 0) || (strncmp(bp->srccoin->symbol, "STAKEE", 6) == 0) ) && src_or_dest == 0 && strcmp(bp->destcoin->symbol,"KMD") == 0 )
if ( ( (strncmp(bp->srccoin->symbol, "STKD", 4) == 0) || (strncmp(bp->srccoin->symbol, "STAKED", 6) == 0) ) && src_or_dest == 0 && strcmp(bp->destcoin->symbol,"KMD") == 0 )
{
kmdcoin = bp->destcoin;
if ( (infojson= dpow_getinfo(myinfo,kmdcoin)) != 0 )

13
iguana/iguana_notary.c

@ -61,21 +61,20 @@ void dpow_checkpointset(struct supernet_info *myinfo,struct dpow_checkpoint *che
void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t height,bits256 hash,uint32_t timestamp,uint32_t blocktime)
{
//struct komodo_ccdataMoMoM mdata; cJSON *blockjson; uint64_t signedmask; struct iguana_info *coin;
void **ptrs; char str[65]; struct dpow_checkpoint checkpoint; int32_t i,ht,suppress=0; struct dpow_block *bp;
void **ptrs; char str[65]; struct dpow_checkpoint checkpoint; int32_t checkpointfreq,i,ht,suppress=0; struct dpow_block *bp;
dpow_checkpointset(myinfo,&dp->last,height,hash,timestamp,blocktime);
checkpoint = dp->srcfifo[dp->srcconfirms];
dpow_fifoupdate(myinfo,dp->srcfifo,dp->last);
if ( strcmp(dp->dest,"KMD") == 0 )
{
if ( dp->DESTHEIGHT < dp->prevDESTHEIGHT+DPOW_CHECKPOINTFREQ )
checkpointfreq = DPOW_CHECKPOINTFREQ;
if ( (strncmp(dp->symbol, "STKD", 4) == 0) || (strncmp(dp->symbol, "STAKED", 6) == 0) )
checkpointfreq = 5;
if ( dp->DESTHEIGHT < dp->prevDESTHEIGHT+checkpointfreq )
{
if ( (strncmp(dp->symbol, "STKD", 4) == 0) || (strncmp(dp->symbol, "STAKED", 6) == 0) )
suppress = 0;
else
suppress = 1;
//fprintf(stderr,"suppress.[%d] %s -> KMD freq KMD prevDESTHEIGHT.%d\n",suppress,dp->symbol,dp->prevDESTHEIGHT);
fprintf(stderr,"suppress.[%d] %s -> KMD freq KMD blocks.%d\n",suppress,dp->symbol,checkpointfreq);
}
}
/*if ( strcmp(dp->dest,"KMD") == 0 )//|| strcmp(dp->dest,"CHAIN") == 0 )
{

Loading…
Cancel
Save