From 9c5bb011b7e30d2b237aba1f1bd510f344e7cd85 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 20 Dec 2016 13:26:59 +0200 Subject: [PATCH] test --- iguana/dpow/dpow_network.c | 3 ++- iguana/dpow/dpow_tx.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index e036382db..36cd50ddf 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -604,6 +604,7 @@ void dpow_bestconsensus(struct dpow_block *bp) { bp->bestmask = masks[besti]; bp->bestk = bestks[besti]; + printf("set best to (%d %llx) recv.%llx\n",bp->bestk,(long long)bp->bestmask,(long long)recvmask); } bp->recvmask = recvmask; if ( bp->bestmask == 0 )//|| (time(NULL) / 180) != bp->lastepoch ) @@ -657,7 +658,7 @@ void dpow_notarize_update(struct supernet_info *myinfo,struct dpow_info *dp,stru dpow_bestconsensus(bp); //bp->recvmask |= (1LL << senderind) | (1LL << bp->myind); //bp->bestmask = dpow_maskmin(bp->recvmask,bp,&bp->bestk); - if ( bp->paxwdcrc != 0 ) + //if ( bp->paxwdcrc != 0 ) bp->notaries[bp->myind].paxwdcrc = bp->paxwdcrc; if ( bp->bestk >= 0 ) bp->notaries[bp->myind].bestk = bp->bestk; diff --git a/iguana/dpow/dpow_tx.c b/iguana/dpow/dpow_tx.c index 8e71a65ff..ccc1f736d 100755 --- a/iguana/dpow/dpow_tx.c +++ b/iguana/dpow/dpow_tx.c @@ -110,7 +110,7 @@ uint64_t dpow_notarybestk(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp) k = (j + (bp->height/DPOW_CHECKPOINTFREQ)) % bp->numnotaries; //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 ) + if ( bits256_nonz(bp->notaries[k].src.prev_hash) != 0 && bits256_nonz(bp->notaries[k].dest.prev_hash) != 0 && bp->paxwdcrc == bp->notaries[k].paxwdcrc ) { mask |= (1LL << k); if ( ++m == bp->minsigs )//-bp->require0 )