From 1fa67da5b58aa576d6ba73b5caa54b4aca568ede Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 14 Oct 2016 17:17:51 -0300 Subject: [PATCH] test --- iguana/dPoW.h | 2 +- iguana/dpow/dpow_fsm.c | 7 +++---- iguana/dpow/dpow_network.c | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/iguana/dPoW.h b/iguana/dPoW.h index bef308c84..b979f70fc 100755 --- a/iguana/dPoW.h +++ b/iguana/dPoW.h @@ -16,7 +16,7 @@ #ifndef INCLUDE_DPOW_H #define INCLUDE_DPOW_H -#define DPOW_M(bp) (2) // (((bp)->numnotaries >> 1) + 1) +#define DPOW_M(bp) (3) // (((bp)->numnotaries >> 1) + 1) #define DPOW_VERSION 0x0103 #define DPOW_UTXOSIZE 10000 diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index e0d1581cc..1a93a9286 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -87,10 +87,9 @@ void dpow_datahandler(struct supernet_info *myinfo,uint32_t channel,uint32_t hei ep->recvmask = E.recvmask; dpow_sync(myinfo,bp,ep->recvmask,myind,srchash,channel); flag = 1; - printf("<<<<<<<<<< %s from.%ld got ht.%d %s/v%d\n",bp->coin->symbol,((long)ep - (long)bp->notaries)/sizeof(*ep),height,bits256_str(str,E.prev_hash),E.prev_vout); } } - //if ( 0 && flag == 0 && bp != 0 ) + if ( 0 && flag == 0 && bp != 0 ) printf("UTXO.%d hashmsg.(%s) txid.(%s) v%d\n",height,bits256_str(str,hashmsg),bits256_str(str2,E.prev_hash),E.prev_vout); } else if ( channel == DPOW_SIGCHANNEL || channel == DPOW_SIGBTCCHANNEL ) @@ -120,12 +119,12 @@ void dpow_datahandler(struct supernet_info *myinfo,uint32_t channel,uint32_t hei } else printf("%s pubkey mismatch for senderind.%d %llx vs %llx\n",bp->coin->symbol,dsig.senderind,*(long long *)dsig.senderpub,*(long long *)bp->notaries[dsig.senderind].pubkey); } else printf("%s illegal lastk.%d or senderind.%d or senderpub.%llx\n",bp->coin->symbol,dsig.lastk,dsig.senderind,*(long long *)dsig.senderpub); } else printf("couldnt find senderind.%d height.%d channel.%x\n",dsig.senderind,height,channel); - //if ( 0 && bp != 0 ) + if ( 0 && bp != 0 ) printf(" SIG.%d sender.%d lastk.%d mask.%llx siglen.%d recv.%llx\n",height,dsig.senderind,dsig.lastk,(long long)dsig.mask,dsig.siglen,(long long)bp->recvmask); } else if ( channel == DPOW_TXIDCHANNEL || channel == DPOW_BTCTXIDCHANNEL ) { - printf("handle channel.%x\n",channel); + printf("handle txid channel.%x\n",channel); if ( (bp= dpow_heightfind(myinfo,height,channel == DPOW_BTCTXIDCHANNEL)) != 0 ) { //printf("bp.%p datalen.%d\n",bp,datalen); diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 6beac02a9..322e3cece 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -97,7 +97,7 @@ void dpow_send(struct supernet_info *myinfo,struct dpow_block *bp,bits256 srchas memcpy(np->packet,data,datalen); sentbytes = nn_send(myinfo->DPOW.sock,np,size,0); free(np); - printf("NANOSEND ht.%d channel.%08x (%d) crc32.%08x datalen.%d\n",np->height,np->channel,size,np->crc32,datalen); + //printf("NANOSEND ht.%d channel.%08x (%d) crc32.%08x datalen.%d\n",np->height,np->channel,size,np->crc32,datalen); } } @@ -114,7 +114,7 @@ void dpow_nanomsg_update(struct supernet_info *myinfo) if ( crc32 == np->crc32 && (firstz= dpow_crc32find(myinfo,crc32,np->channel)) >= 0 ) { myinfo->DPOW.crcs[firstz] = crc32; - printf("NANORECV ht.%d channel.%08x (%d) crc32.%08x:%08x datalen.%d:%d\n",np->height,np->channel,size,np->crc32,crc32,np->datalen,(int32_t)(size - sizeof(*np))); + //printf("NANORECV ht.%d channel.%08x (%d) crc32.%08x:%08x datalen.%d:%d\n",np->height,np->channel,size,np->crc32,crc32,np->datalen,(int32_t)(size - sizeof(*np))); dpow_datahandler(myinfo,np->channel,np->height,np->packet,np->datalen); } } else printf("np->datalen.%d (size %d - %ld)\n",np->datalen,size,sizeof(*np));