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

4
iguana/dpow/dpow_fsm.c

@ -44,7 +44,7 @@ void dpow_ratify_update(struct supernet_info *myinfo,struct dpow_info *dp,struct
bp->notaries[bp->myind].ratifybestk = bp->ratifybestk;
for (i=0; i<bp->numnotaries; i++)
{
if ( bp->notaries[i].ratifybestk == bp->ratifybestk && bp->notaries[i].ratifybestmask == bp->ratifybestmask )
if ( bp->ratifybestk >= 0 && bp->notaries[i].ratifybestk == bp->ratifybestk && bp->notaries[i].ratifybestmask == bp->ratifybestmask )
{
matches++;
if ( ((1LL << i) & bp->ratifybestmask) != 0 )
@ -62,7 +62,7 @@ void dpow_ratify_update(struct supernet_info *myinfo,struct dpow_info *dp,struct
dpow_signedtxgen(myinfo,dp,bp->srccoin,bp,bp->pendingbestk,bp->pendingbestmask,bp->myind,DPOW_SIGCHANNEL,0,1);
}
}
printf("RATIFY.%d matches.%d bestmatches.%d bestk.%d %llx recv.%llx sigmasks.(%llx %llx)\n",bp->minsigs,matches,bestmatches,bp->ratifybestk,(long long)bp->ratifybestmask,(long long)bp->ratifyrecvmask,(long long)bp->ratifysigs[1],(long long)bp->ratifysigs[0]);
printf("RATIFY.%d matches.%d bestmatches.%d bestk.%d %llx recv.%llx sigmasks.(%llx %llx)\n",bp->minsigs,matches,bestmatches,bp->ratifybestk,(long long)bp->ratifybestmask,(long long)bp->ratifyrecvmask,(long long)bp->ratifysigmasks[1],(long long)bp->ratifysigmasks[0]);
}
}
}

2
iguana/dpow/dpow_tx.c

@ -79,6 +79,7 @@ uint64_t dpow_ratifybest(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp)
{
int32_t j,m,k; uint64_t bestmask,mask = bp->require0;
bestmask = 0;
*lastkp = -1;
m = bp->require0;
for (j=0; j<bp->numnotaries; j++)
{
@ -100,6 +101,7 @@ uint64_t dpow_maskmin(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp)
{
int32_t j,m,k; uint64_t bestmask,mask = bp->require0;
bestmask = 0;
*lastkp = -1;
m = bp->require0;
for (j=0; j<bp->numnotaries; j++)
{

Loading…
Cancel
Save