Browse Source

test

etomic
jl777 8 years ago
parent
commit
9c5bb011b7
  1. 3
      iguana/dpow/dpow_network.c
  2. 2
      iguana/dpow/dpow_tx.c

3
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;

2
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 )

Loading…
Cancel
Save