|
@ -593,7 +593,7 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru |
|
|
if ( bp->bestk >= 0 && bp->notaries[i].bestk == bp->bestk && bp->notaries[i].bestmask == bp->bestmask ) |
|
|
if ( bp->bestk >= 0 && bp->notaries[i].bestk == bp->bestk && bp->notaries[i].bestmask == bp->bestmask ) |
|
|
{ |
|
|
{ |
|
|
matches++; |
|
|
matches++; |
|
|
if ( ((1LL << i) & bp->bestmask) != 0 && bp->notaries[i].paxwdcrc == bp->notaries[i].paxwdcrc ) |
|
|
if ( ((1LL << i) & bp->bestmask) != 0 && bp->paxwdcrc == bp->notaries[i].paxwdcrc ) |
|
|
bestmatches++; |
|
|
bestmatches++; |
|
|
} // else printf("mismatch.%d (%d %llx) ",i,bp->notaries[i].bestk,(long long)bp->notaries[i].bestmask);
|
|
|
} // else printf("mismatch.%d (%d %llx) ",i,bp->notaries[i].bestk,(long long)bp->notaries[i].bestmask);
|
|
|
} |
|
|
} |
|
@ -619,7 +619,7 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if ( (rand() % 100) == 0 ) |
|
|
if ( (rand() % 100) == 0 ) |
|
|
printf("[%d] ips.%d %s NOTARIZE.%d matches.%d bestmatches.%d bestk.%d %llx recv.%llx sigmasks.(%llx %llx) senderind.%d state.%x (%x %x %x)\n",bp->myind,dp->numipbits,dp->symbol,bp->minsigs,matches,bestmatches,bp->bestk,(long long)bp->bestmask,(long long)bp->recvmask,(long long)(bp->bestk>=0?bp->destsigsmasks[bp->bestk]:0),(long long)(bp->bestk>=0?bp->srcsigsmasks[bp->bestk]:0),senderind,bp->state,bp->hashmsg.uints[0],bp->desttxid.uints[0],bp->srctxid.uints[0]); |
|
|
printf("[%d] ips.%d %s NOTARIZE.%d matches.%d bestmatches.%d bestk.%d %llx recv.%llx sigmasks.(%llx %llx) senderind.%d state.%x (%x %x %x) pax.%x\n",bp->myind,dp->numipbits,dp->symbol,bp->minsigs,matches,bestmatches,bp->bestk,(long long)bp->bestmask,(long long)bp->recvmask,(long long)(bp->bestk>=0?bp->destsigsmasks[bp->bestk]:0),(long long)(bp->bestk>=0?bp->srcsigsmasks[bp->bestk]:0),senderind,bp->state,bp->hashmsg.uints[0],bp->desttxid.uints[0],bp->srctxid.uints[0],bp->paxwdcrc); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -679,8 +679,8 @@ void dpow_send(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_blo |
|
|
np->version0 = DPOW_VERSION & 0xff; |
|
|
np->version0 = DPOW_VERSION & 0xff; |
|
|
np->version1 = (DPOW_VERSION >> 8) & 0xff; |
|
|
np->version1 = (DPOW_VERSION >> 8) & 0xff; |
|
|
if ( extralen > 0 ) |
|
|
if ( extralen > 0 ) |
|
|
np->notarize.paxwdcrc = calc_crc32(0,extras,extralen); |
|
|
bp->paxwdcrc = np->notarize.paxwdcrc = calc_crc32(0,extras,extralen); |
|
|
else np->notarize.paxwdcrc = 0; |
|
|
else bp->paxwdcrc = np->notarize.paxwdcrc = 0; |
|
|
memcpy(np->packet,data,datalen); |
|
|
memcpy(np->packet,data,datalen); |
|
|
sentbytes = nn_send(myinfo->dpowsock,np,size,0); |
|
|
sentbytes = nn_send(myinfo->dpowsock,np,size,0); |
|
|
free(np); |
|
|
free(np); |
|
|