jl777 8 years ago
parent
commit
e1d9efd425
  1. 4
      iguana/dpow/dpow_fsm.c
  2. 2
      iguana/dpow/dpow_tx.c

4
iguana/dpow/dpow_fsm.c

@ -353,7 +353,11 @@ int32_t dpow_update(struct supernet_info *myinfo,struct dpow_info *dp,struct dpo
printf("[%d] %s isratify.%d ht.%d FSM.%08x masks.%llx best.(%d %llx) sigsmask.%llx %llx src.%llx\n",myind,src_or_dest != 0 ? bp->destcoin->symbol : bp->srccoin->symbol,bp->isratify,bp->height,bp->state,(long long)bp->recvmask,bp->bestk,(long long)bp->bestmask,(long long)sigsmask,(long long)(sigsmask & bp->bestmask),(long long)srcmask);
}
if ( bp->isratify != 0 || (rand() % 10) == 0 )
{
dpow_sendcoinentrys(myinfo,dp,bp,bp->state < 1000);
bp->bestmask = dpow_maskmin(bp->recvmask,bp,&bp->bestk);
printf("ht.%d numnotaries.%d BEST.%llx from RECV.%llx bestk.%d\n",bp->height,bp->numnotaries,(long long)bp->bestmask,(long long)bp->recvmask,bp->bestk);
}
}
if ( bp->state < 1000 && bp->bestk >= 0 && (bp->destsigsmasks[bp->bestk] & bp->bestmask) == bp->bestmask )
{

2
iguana/dpow/dpow_tx.c

@ -50,7 +50,7 @@ uint64_t dpow_maskmin(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp)
int32_t j,m,k; uint64_t mask = 0;
for (j=m=0; j<bp->numnotaries; j++)
{
k = DPOW_MODIND(bp,j);//((bp->height % bp->numnotaries) + j) % bp->numnotaries;
k = DPOW_MODIND(bp,j);
if ( bits256_nonz(bp->notaries[k].src.prev_hash) != 0 && bits256_nonz(bp->notaries[k].dest.prev_hash) != 0 )
{
mask |= (1LL << k);

Loading…
Cancel
Save