Browse Source

One week loopback + prints

jl777
jl777 7 years ago
parent
commit
f51ac7aefa
  1. 2
      iguana/dPoW.h
  2. 2
      iguana/dpow/dpow_fsm.c
  3. 5
      iguana/dpow/dpow_rpc.c

2
iguana/dPoW.h

@ -16,6 +16,8 @@
#ifndef INCLUDE_DPOW_H
#define INCLUDE_DPOW_H
#define DPOW_MAXMOMDEPTH (1440 * 7)
#define DPOW_FIRSTRATIFY 1000
#define DPOW_CHECKPOINTFREQ 10

2
iguana/dpow/dpow_fsm.c

@ -346,7 +346,7 @@ int32_t dpow_hasnotarization(uint64_t *signedmaskp,int32_t *nothtp,struct supern
bits256 dpow_calcMoM(uint32_t *MoMdepthp,struct supernet_info *myinfo,struct iguana_info *coin,int32_t height)
{
struct komodo_ccdataMoMoM mdata; bits256 MoM,blockhash,merkle,*merkles; cJSON *blockjson; uint64_t signedmask; int32_t breakht=0,notht=0,ht,maxdepth = 1440,MoMdepth = 0;
struct komodo_ccdataMoMoM mdata; bits256 MoM,blockhash,merkle,*merkles; cJSON *blockjson; uint64_t signedmask; int32_t breakht=0,notht=0,ht,maxdepth = DPOW_MAXMOMDEPTH,MoMdepth = 0;
memset(MoM.bytes,0,sizeof(MoM));
blockhash = dpow_getblockhash(myinfo,coin,height);
//printf("start MoM calc %s height.%d\n",coin->symbol,height);

5
iguana/dpow/dpow_rpc.c

@ -246,7 +246,7 @@ cJSON *dpow_MoMoMdata(struct iguana_info *coin,char *symbol,int32_t kmdheight)
int32_t dpow_paxpending(uint8_t *hex,int32_t hexsize,uint32_t *paxwdcrcp,bits256 MoM,uint32_t MoMdepth,int32_t src_or_dest,struct dpow_block *bp)
{
struct iguana_info *coin,*kmdcoin=0; char *retstr,*hexstr; cJSON *retjson; int32_t hexlen,n=0; uint32_t paxwdcrc;
struct iguana_info *coin,*kmdcoin=0; char *retstr,*hexstr; cJSON *retjson; int32_t hexlen=0,n=0; uint32_t paxwdcrc;
paxwdcrc = 0;
//if ( Notaries_port != DPOW_SOCKPORT )
{
@ -267,9 +267,10 @@ int32_t dpow_paxpending(uint8_t *hex,int32_t hexsize,uint32_t *paxwdcrcp,bits256
}
paxwdcrc = calc_crc32(0,hex,n) & 0xffffff00;
paxwdcrc |= (n & 0xff);
if ( hexlen > 0 )
printf("%s.ht.%d opretlen.%d src_or_dest.%d dest.(%s) lastbest.%d paxwdcrc.%x\n",bp->srccoin->symbol,bp->height,n,src_or_dest,bp->destcoin->symbol,kmdcoin!=0?((kmdcoin->lastbestheight/10)*10 - 5):-1,paxwdcrc);
}
*paxwdcrcp = paxwdcrc;
printf("ht.%d opretlen.%d src_or_dest.%d dest.(%s) lastbest.%d paxwdcrc.%x\n",bp->height,n,src_or_dest,bp->destcoin->symbol,kmdcoin!=0?((kmdcoin->lastbestheight/10)*10 - 5):-1,paxwdcrc);
return(n);
if ( (coin= iguana_coinfind("KMD")) != 0 )
{

Loading…
Cancel
Save