From 349a7de477f1a498cdb320cfb6d52d1bfa98728e Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 10 Nov 2016 11:22:28 -0300 Subject: [PATCH] test --- iguana/dpow/dpow_fsm.c | 4 ++-- iguana/dpow/dpow_network.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index 6580ad2fe..e560d4a62 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -436,11 +436,11 @@ uint32_t dpow_statemachineiterate(struct supernet_info *myinfo,struct dpow_info int32_t dpow_checkutxo(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp,struct iguana_info *coin,bits256 *txidp,int32_t *voutp,char *coinaddr) { int32_t haveutxo,completed; bits256 signedtxid; cJSON *addresses; char *rawtx,*sendtx; - if ( (haveutxo= dpow_haveutxo(myinfo,coin,txidp,voutp,coinaddr)) <= 10 && time(NULL) > dp->lastsplit+bp->duration ) + if ( (haveutxo= dpow_haveutxo(myinfo,coin,txidp,voutp,coinaddr)) <= 25 && time(NULL) > dp->lastsplit+bp->duration ) { addresses = cJSON_CreateArray(); jaddistr(addresses,coinaddr); - if ( (rawtx= iguana_utxoduplicates(myinfo,coin,dp->minerkey33,DPOW_UTXOSIZE,strcmp(coin->symbol,"BTC") == 0 ? 50 : 10,&completed,&signedtxid,0,addresses)) != 0 ) + if ( (rawtx= iguana_utxoduplicates(myinfo,coin,dp->minerkey33,DPOW_UTXOSIZE,strcmp(coin->symbol,"BTC") == 0 ? 50 : 50,&completed,&signedtxid,0,addresses)) != 0 ) { if ( (sendtx= dpow_sendrawtransaction(myinfo,coin,rawtx)) != 0 ) { diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 51265cd04..f6d97b5e2 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -163,7 +163,7 @@ void dpow_ipbitsadd(struct supernet_info *myinfo,uint32_t *ipbits,int32_t numipb missing++; } //printf("recv numipbits.%d numdpowipbits.%d matched.%d missing.%d\n",numipbits,n,matched,missing); - if ( (numipbits == 1 || missing < matched) && missing > 0 ) + if ( (numipbits == 1 || missing < matched || matched > (myinfo->numipbits>>1)) && missing > 0 ) { for (i=0; ichannel,np->height,np->packet,np->datalen) >= 0 ) dp->crcs[firstz] = crc32; } - } else printf("np->datalen.%d %d (size %d - %ld)\n",np->datalen,(int32_t)(size-sizeof(*np)),size,sizeof(*np)); + } else printf("ignore np->datalen.%d %d (size %d - %ld)\n",np->datalen,(int32_t)(size-sizeof(*np)),size,sizeof(*np)); } if ( np != 0 ) nn_freemsg(np);