Browse Source

Crash fix test

jl777
jl777 7 years ago
parent
commit
ec2df73cbf
  1. 2
      iguana/dpow/dpow_fsm.c
  2. 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); 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->lastrecvmask = bp->recvmask;
dp->ratifying -= bp->isratify; dp->ratifying -= bp->isratify;
// dp->blocks[bp->height] = 0; // dp->blocks[bp->height] = 0;
bp->state = 0xffffffff;
free(ptr); free(ptr);
} }

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--) 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; dp->blocks[i] = 0;
Numallocated--; Numallocated--;

Loading…
Cancel
Save