|
|
@ -556,7 +556,7 @@ void dpow_ratify_update(struct supernet_info *myinfo,struct dpow_info *dp,struct |
|
|
|
|
|
|
|
void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp,uint8_t senderind,int8_t bestk,uint64_t bestmask,uint64_t recvmask,bits256 srcutxo,uint16_t srcvout,bits256 destutxo,uint16_t destvout,uint8_t siglens[2],uint8_t sigs[2][DPOW_MAXSIGLEN],uint32_t paxwdcrc) |
|
|
|
{ |
|
|
|
int32_t i,bestmatches = 0,matches = 0; |
|
|
|
int32_t i,bestmatches = 0,matches = 0,paxmatches = 0; |
|
|
|
if ( bp->myind < 0 ) |
|
|
|
return; |
|
|
|
if ( bp->isratify == 0 && bp->state != 0xffffffff && senderind >= 0 && senderind < bp->numnotaries && bits256_nonz(srcutxo) != 0 && bits256_nonz(destutxo) != 0 ) |
|
|
@ -597,8 +597,10 @@ 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 ) |
|
|
|
{ |
|
|
|
matches++; |
|
|
|
if ( ((1LL << i) & bp->bestmask) != 0 && bp->paxwdcrc == bp->notaries[i].paxwdcrc ) |
|
|
|
bestmatches++; |
|
|
|
if ( bp->paxwdcrc == bp->notaries[i].paxwdcrc ) |
|
|
|
paxmatches++; |
|
|
|
if ( ((1LL << i) & bp->bestmask) != 0 ) |
|
|
|
bestmatches++; |
|
|
|
} // else printf("mismatch.%d (%d %llx) ",i,bp->notaries[i].bestk,(long long)bp->notaries[i].bestmask);
|
|
|
|
} |
|
|
|
if ( bestmatches >= bp->minsigs ) |
|
|
@ -623,7 +625,7 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru |
|
|
|
} |
|
|
|
} |
|
|
|
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) 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); |
|
|
|
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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|