Browse Source

Fix event stream

patch-3
jl777 7 years ago
parent
commit
32a9d52a1d
  1. 2
      iguana/dpow/dpow_fsm.c
  2. 4
      iguana/exchanges/stats.c
  3. 2
      iguana/iguana_notary.c

2
iguana/dpow/dpow_fsm.c

@ -462,10 +462,10 @@ void dpow_statemachinestart(void *ptr)
}
}
printf("[%d] END isratify.%d:%d bestk.%d %llx sigs.%llx state.%x machine ht.%d completed state.%x %s.%s %s.%s recvmask.%llx paxwdcrc.%x %p %p\n",Numallocated,bp->isratify,dp->ratifying,bp->bestk,(long long)bp->bestmask,(long long)(bp->bestk>=0?bp->destsigsmasks[bp->bestk]:0),bp->state,bp->height,bp->state,dp->dest,bits256_str(str,bp->desttxid),dp->symbol,bits256_str(str2,bp->srctxid),(long long)bp->recvmask,bp->paxwdcrc,src,dest);
bp->state = 0xffffffff;
dp->lastrecvmask = bp->recvmask;
dp->ratifying -= bp->isratify;
// dp->blocks[bp->height] = 0;
bp->state = 0xffffffff;
free(ptr);
}

4
iguana/exchanges/stats.c

@ -573,7 +573,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po
if ( IPC_ENDPOINT >= 0 && (queueid= juint(arg,"queueid")) > 0 )
{
buf = jprint(arg,0);
LP_queuecommand(&retstr,buf,IPC_ENDPOINT,1,queueid);
LP_queuecommand(&retstr,buf,IPC_ENDPOINT,-1,queueid);
free(buf);
retstr = clonestr("{\"result\":\"success\",\"status\":\"queued\"}");
} else retstr = stats_JSON(ctx,"127.0.0.1",-1,arg,remoteaddr,port);
@ -582,7 +582,7 @@ char *stats_rpcparse(char *retbuf,int32_t bufsize,int32_t *jsonflagp,int32_t *po
if ( IPC_ENDPOINT >= 0 && (queueid= juint(arg,"queueid")) > 0 )
{
buf = jprint(arg,0);
LP_queuecommand(&retstr,buf,IPC_ENDPOINT,1,queueid);
LP_queuecommand(&retstr,buf,IPC_ENDPOINT,-1,queueid);
free(buf);
} else retstr = stats_JSON(ctx,myipaddr,-1,arg,remoteaddr,port);
#endif

2
iguana/iguana_notary.c

@ -211,7 +211,7 @@ void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t he
{
for (i=ht-100; i>=0; i--)
{
if ( (bp= dp->blocks[i]) != 0 )
if ( (bp= dp->blocks[i]) != 0 && bp->state == 0xffffffff )
{
dp->blocks[i] = 0;
Numallocated--;

Loading…
Cancel
Save