From e2c74aff989849cb1e9a5b546301cec70be0fcb4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 4 Nov 2016 11:35:03 -0300 Subject: [PATCH] test --- iguana/dpow/dpow_fsm.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index 724f924c7..25e13337f 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -130,22 +130,27 @@ int32_t dpow_datahandler(struct supernet_info *myinfo,struct dpow_info *dp,uint3 bestk = data[rlen++]; n = data[rlen++]; rlen += iguana_rwbignum(0,&data[rlen],sizeof(hashmsg),hashmsg.bytes); + printf("got ENTRIES src_or_dest.%d bestk.%d numnotaries.%d\n",src_or_dest,bestk,n); if ( bits256_cmp(hashmsg,bp->hashmsg) == 0 ) { memset(notaries,0,sizeof(notaries)); for (i=0; i<64; i++) notaries[i].bestk = -1; rlen += dpow_rwcoinentrys(0,&data[rlen],src_or_dest,notaries,n,bestk); + printf("matched hashmsg rlen.%d vs datalen.%d\n",rlen,datalen); for (i=0; inotaries[i].dest : &bp->notaries[i].src; - if ( bits256_nonz(ptr->prev_hash) != 0 && bits256_nonz(refptr->prev_hash) == 0 ) + if ( bits256_nonz(ptr->prev_hash) != 0 ) { - printf("got utxo.[%d] indirectly\n",i); - refptr->prev_hash = ptr->prev_hash; - refptr->prev_vout = ptr->prev_vout; - bp->recvmask |= (1LL << i); + if ( bits256_nonz(refptr->prev_hash) == 0 ) + { + printf("got utxo.[%d] indirectly\n",i); + refptr->prev_hash = ptr->prev_hash; + refptr->prev_vout = ptr->prev_vout; + bp->recvmask |= (1LL << i); + } } if ( (bestk= notaries[i].bestk) >= 0 ) {