jl777 8 years ago
parent
commit
7060a33a37
  1. 6
      iguana/dpow/dpow_fsm.c
  2. 2
      iguana/dpow/dpow_network.c

6
iguana/dpow/dpow_fsm.c

@ -16,8 +16,8 @@
void dpow_ratify_update(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp,uint8_t senderind,int8_t bestk,uint64_t bestmask,uint64_t recvmask,bits256 srcutxo,uint16_t srcvout,bits256 destutxo,uint16_t destvout,uint8_t siglens[2],uint8_t sigs[2][76])
{
int32_t i,bestmatches = 0,matches = 0;
char str[65],str2[65];
printf("senderind.%d num.%d %s %s\n",senderind,bp->numnotaries,bits256_str(str,srcutxo),bits256_str(str2,destutxo));
//char str[65],str2[65];
//printf("senderind.%d num.%d %s %s\n",senderind,bp->numnotaries,bits256_str(str,srcutxo),bits256_str(str2,destutxo));
if ( senderind >= 0 && senderind < bp->numnotaries && bits256_nonz(srcutxo) != 0 && bits256_nonz(destutxo) != 0 )
{
bp->notaries[senderind].ratifysrcutxo = srcutxo;
@ -64,8 +64,8 @@ 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->ratifysigmasks[1],(long long)bp->ratifysigmasks[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_network.c

@ -131,7 +131,7 @@ void dpow_send(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_blo
np->bestmask = dpow_maskmin(bp->recvmask,bp,&np->bestk);
np->senderind = bp->myind;
memcpy(np->ipbits,myinfo->dpowipbits,myinfo->numdpowipbits * sizeof(*myinfo->dpowipbits));
printf("dpow_send.(%d) size.%d numipbits.%d\n",datalen,size,np->numipbits);
//printf("dpow_send.(%d) size.%d numipbits.%d\n",datalen,size,np->numipbits);
np->srcutxo = bp->notaries[bp->myind].ratifysrcutxo;
np->srcvout = bp->notaries[bp->myind].ratifysrcvout;
np->destutxo = bp->notaries[bp->myind].ratifydestutxo;

Loading…
Cancel
Save