diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 4c56f977b..75f3352a7 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -213,6 +213,7 @@ int32_t basilisk_sendcmd(struct supernet_info *myinfo,char *destipaddr,char *typ return(-1); } //portable_mutex_lock(&myinfo->allcoins_mutex); + dex_reqsend(myinfo,&data[-(int32_t)sizeof(struct iguana_msghdr)],datalen); alreadysent = calloc(IGUANA_MAXPEERS * IGUANA_MAXCOINS,sizeof(*alreadysent)); HASH_ITER(hh,myinfo->allcoins,coin,tmp) { diff --git a/iguana/dPoW.h b/iguana/dPoW.h index 350178645..7ce7f1dcd 100755 --- a/iguana/dPoW.h +++ b/iguana/dPoW.h @@ -141,5 +141,6 @@ struct dpow_info uint64_t dpow_notarybestk(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp); int32_t dpow_paxpending(uint8_t *hex,uint32_t *paxwdcrcp); void dex_updateclient(struct supernet_info *myinfo); +int32_t dex_reqsend(struct supernet_info *myinfo,uint8_t *data,int32_t datalen); #endif diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 7587de146..0c11ec713 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -56,7 +56,7 @@ static int _increasing_ipbits(const void *a,const void *b) void dex_packet(struct supernet_info *myinfo,struct dex_nanomsghdr *dexp,int32_t size) { - printf("DEX_PACKET.[%d] crc.%x lag.%d\n",size,calc_crc32(0,(void *)((long)dexp+sizeof(dexp->crc32)),(int32_t)(size-sizeof(dexp->crc32))),(int32_t)(time(NULL)-dexp->timestamp)); + printf("uniq DEX_PACKET.[%d] crc.%x lag.%d\n",size,calc_crc32(0,(void *)((long)dexp+sizeof(dexp->crc32)),(int32_t)(size-sizeof(dexp->crc32))),(int32_t)(time(NULL)-dexp->timestamp)); } int32_t dex_reqsend(struct supernet_info *myinfo,uint8_t *data,int32_t datalen) @@ -717,11 +717,13 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru else bp->destsigsmasks[bestk] &= ~(1LL << senderind); } } - dpow_bestconsensus(bp); - //bp->recvmask |= (1LL << senderind) | (1LL << bp->myind); - //bp->bestmask = dpow_maskmin(bp->recvmask,bp,&bp->bestk); - //if ( bp->paxwdcrc != 0 ) - bp->notaries[bp->myind].paxwdcrc = bp->paxwdcrc; + if ( (bp->notaries[bp->myind].paxwdcrc= bp->paxwdcrc) != 0 ) + dpow_bestconsensus(bp); + else + { + bp->recvmask |= (1LL << senderind) | (1LL << bp->myind); + bp->bestmask = dpow_maskmin(bp->recvmask,bp,&bp->bestk); + } if ( bp->bestk >= 0 ) bp->notaries[bp->myind].bestk = bp->bestk; if ( bp->bestmask != 0 )