|
@ -704,7 +704,7 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru |
|
|
if ( bestmask != 0 ) |
|
|
if ( bestmask != 0 ) |
|
|
bp->notaries[senderind].bestmask = bestmask; |
|
|
bp->notaries[senderind].bestmask = bestmask; |
|
|
if ( recvmask != 0 ) |
|
|
if ( recvmask != 0 ) |
|
|
bp->notaries[senderind].recvmask = recvmask; |
|
|
bp->notaries[senderind].recvmask |= recvmask; |
|
|
if ( (bp->notaries[senderind].paxwdcrc= paxwdcrc) != 0 ) |
|
|
if ( (bp->notaries[senderind].paxwdcrc= paxwdcrc) != 0 ) |
|
|
{ |
|
|
{ |
|
|
//fprintf(stderr,"{%d %x} ",senderind,paxwdcrc);
|
|
|
//fprintf(stderr,"{%d %x} ",senderind,paxwdcrc);
|
|
@ -741,7 +741,8 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru |
|
|
bp->notaries[bp->myind].recvmask = bp->recvmask; |
|
|
bp->notaries[bp->myind].recvmask = bp->recvmask; |
|
|
if ( bp->bestk >= 0 ) |
|
|
if ( bp->bestk >= 0 ) |
|
|
{ |
|
|
{ |
|
|
for (i=flag=0; i<bp->numnotaries; i++) |
|
|
flag = -1; |
|
|
|
|
|
for (i=0; i<bp->numnotaries; i++) |
|
|
{ |
|
|
{ |
|
|
if ( bp->paxwdcrc == bp->notaries[i].paxwdcrc ) |
|
|
if ( bp->paxwdcrc == bp->notaries[i].paxwdcrc ) |
|
|
paxmatches++; |
|
|
paxmatches++; |
|
@ -757,12 +758,12 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru |
|
|
} //else printf("?%x ",bp->notaries[i].paxwdcrc);
|
|
|
} //else printf("?%x ",bp->notaries[i].paxwdcrc);
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else if ( ((1LL << bp->myind) & bp->bestmask) != 0 && ((1LL << i) & bp->bestmask) != 0 && ((1LL << bp->myind) & bp->notaries[i].recvmask) == 0 ) |
|
|
else if ( i == senderind && ((1LL << bp->myind) & bp->bestmask) != 0 && ((1LL << i) & bp->bestmask) != 0 && ((1LL << bp->myind) & bp->notaries[i].recvmask) == 0 ) |
|
|
flag++; |
|
|
flag = senderind; |
|
|
if ( 0 && bp->myind <= 1 && bp->notaries[i].paxwdcrc != 0 ) |
|
|
if ( 0 && bp->myind <= 1 && bp->notaries[i].paxwdcrc != 0 ) |
|
|
printf("%d.(%x %d %llx r%llx) ",i,bp->notaries[i].paxwdcrc,bp->notaries[i].bestk,(long long)bp->notaries[i].bestmask,(long long)bp->notaries[i].recvmask); |
|
|
printf("%d.(%x %d %llx r%llx) ",i,bp->notaries[i].paxwdcrc,bp->notaries[i].bestk,(long long)bp->notaries[i].bestmask,(long long)bp->notaries[i].recvmask); |
|
|
} |
|
|
} |
|
|
if ( flag != 0 ) |
|
|
if ( flag >= 0 ) |
|
|
{ |
|
|
{ |
|
|
printf("flag.%d -> send\n",flag); |
|
|
printf("flag.%d -> send\n",flag); |
|
|
for (i=0; i<sizeof(srchash); i++) |
|
|
for (i=0; i<sizeof(srchash); i++) |
|
@ -794,7 +795,7 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if ( (rand() % 30) == 0 ) |
|
|
if ( (rand() % 30) == 0 ) |
|
|
printf("[%d] ips.%d %s NOTARIZE.%d matches.%d paxmatches.%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,paxmatches,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); |
|
|
printf("%p [%d] ips.%d %s NOTARIZE.%d matches.%d paxmatches.%d bestmatches.%d bestk.%d %llx recv.%llx sigmasks.(%llx %llx) senderind.%d state.%x (%x %x %x) pax.%x\n",bp,bp->myind,dp->numipbits,dp->symbol,bp->minsigs,matches,paxmatches,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); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|