diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 12efa3694..95bdf15cb 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -569,8 +569,8 @@ void dpow_bestconsensus(struct dpow_block *bp) bp->recvmask |= (1LL << i); if ( bp->notaries[i].bestk < 0 || bp->notaries[i].bestmask == 0 ) continue; - if ( bp->require0 != 0 && (bp->notaries[i].bestmask & 1) == 0 ) - continue; + //if ( bp->require0 != 0 && (bp->notaries[i].bestmask & 1) == 0 ) + // continue; for (j=0; jnotaries[i].bestk == bestks[j] && bp->notaries[i].bestmask == masks[j] ) { @@ -621,14 +621,17 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru bp->notaries[senderind].src.prev_vout = srcvout; bp->notaries[senderind].dest.prev_hash = destutxo; bp->notaries[senderind].dest.prev_vout = destvout; - bp->notaries[senderind].bestmask = bestmask; - bp->notaries[senderind].recvmask = recvmask; + if ( bestmask != 0 ) + bp->notaries[senderind].bestmask = bestmask; + if ( recvmask != 0 ) + bp->notaries[senderind].recvmask = recvmask; if ( (bp->notaries[senderind].paxwdcrc= paxwdcrc) != 0 ) { //fprintf(stderr,"{%d %x} ",senderind,paxwdcrc); } - if ( (bp->notaries[senderind].bestk= bestk) >= 0 ) + if ( bestk >= 0 ) { + bp->notaries[senderind].bestk = bestk; if ( (bp->notaries[senderind].src.siglens[bestk]= siglens[0]) != 0 ) { memcpy(bp->notaries[senderind].src.sigs[bestk],sigs[0],siglens[0]); diff --git a/iguana/dpow/dpow_tx.c b/iguana/dpow/dpow_tx.c index 8d555acc5..77a5a627a 100755 --- a/iguana/dpow/dpow_tx.c +++ b/iguana/dpow/dpow_tx.c @@ -101,21 +101,21 @@ uint64_t dpow_ratifybest(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp) uint64_t dpow_notarybestk(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp) { - int32_t m,j,k; uint64_t bestmask,mask = bp->require0; + int32_t m,j,k; uint64_t bestmask,mask = 0;//bp->require0; bestmask = 0; *lastkp = -1; for (m=j=0; jnumnotaries; j++) { k = (j + ((uint32_t)time(NULL) / 180)) % bp->numnotaries; - if ( bp->require0 != 0 && k == 0 ) - continue; + //if ( bp->require0 != 0 && k == 0 ) + // continue; if ( bits256_nonz(bp->notaries[k].src.prev_hash) != 0 && bits256_nonz(bp->notaries[k].dest.prev_hash) != 0 ) { mask |= (1LL << k); - if ( ++m == bp->minsigs-bp->require0 ) + if ( ++m == bp->minsigs )//-bp->require0 ) { *lastkp = k; - bestmask = mask | bp->require0; + bestmask = mask;// | bp->require0; //printf("m.%d == minsigs.%d (%d %llx)\n",m,bp->minsigs,k,(long long)bestmask); } }