jl777 8 years ago
parent
commit
1206d1d793
  1. 2
      iguana/iguana_msg.c
  2. 8
      iguana/iguana_recv.c
  3. 2
      includes/iguana_globals.h

2
iguana/iguana_msg.c

@ -976,7 +976,7 @@ int32_t iguana_msgparser(struct supernet_info *myinfo,struct iguana_info *coin,s
if ( (n= iguana_gentxarray(myinfo,coin,rawmem,&txdata,&len,data,recvlen)) == recvlen || n == recvlen-1 ) if ( (n= iguana_gentxarray(myinfo,coin,rawmem,&txdata,&len,data,recvlen)) == recvlen || n == recvlen-1 )
{ {
len = n; len = n;
iguana_gotblockM(myinfo,coin,addr,&txdata,rawmem->ptr,H,data,recvlen,fromcache,0); iguana_gotblockM(myinfo,coin,addr,&txdata,rawmem->ptr,H,data,recvlen,fromcache,coin->chain->zcash);
} }
else else
{ {

8
iguana/iguana_recv.c

@ -843,13 +843,13 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru
} }
} }
txdata = origtxdata; txdata = origtxdata;
static portable_mutex_t mutex; static int32_t didinit; /*static portable_mutex_t mutex; static int32_t didinit;
if ( didinit == 0 ) if ( didinit == 0 )
{ {
portable_mutex_init(&mutex); portable_mutex_init(&mutex);
didinit = 1; didinit = 1;
} }
portable_mutex_lock(&mutex); portable_mutex_lock(&mutex);*/
if ( iguana_ramchain_data(myinfo,coin,addr,origtxdata,txarray,origtxdata->zblock.RO.txn_count,data,recvlen,bp,block,zcash) >= 0 ) if ( iguana_ramchain_data(myinfo,coin,addr,origtxdata,txarray,origtxdata->zblock.RO.txn_count,data,recvlen,bp,block,zcash) >= 0 )
{ {
txdata->zblock.fpipbits = (uint32_t)addr->ipbits; txdata->zblock.fpipbits = (uint32_t)addr->ipbits;
@ -885,7 +885,7 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru
} }
else if ( bp->queued == 0 && bp->startutxo == 0 ) else if ( bp->queued == 0 && bp->startutxo == 0 )
{ {
//iguana_bundleQ(myinfo,coin,bp,0); iguana_bundleQ(myinfo,coin,bp,0);
//printf("numsaved.%d [%d] %s\n",numsaved,bp->hdrsi,addr->ipaddr); //printf("numsaved.%d [%d] %s\n",numsaved,bp->hdrsi,addr->ipaddr);
} }
} }
@ -895,7 +895,7 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru
req = iguana_recv_bundlereq(coin,addr,0,H,data,recvlen,0,-1,origtxdata); req = iguana_recv_bundlereq(coin,addr,0,H,data,recvlen,0,-1,origtxdata);
queue_enqueue("recvQ",&coin->recvQ,&req->DL); queue_enqueue("recvQ",&coin->recvQ,&req->DL);
} }
portable_mutex_unlock(&mutex); //portable_mutex_unlock(&mutex);
} }
void iguana_gottxidsM(struct iguana_info *coin,struct iguana_peer *addr,bits256 *txids,int32_t n) void iguana_gottxidsM(struct iguana_info *coin,struct iguana_peer *addr,bits256 *txids,int32_t n)

2
includes/iguana_globals.h

@ -42,7 +42,7 @@ char GLOBAL_GENESISDIR[512] = "genesis";
char GLOBAL_VALIDATEDIR[512] = "DB/purgeable"; char GLOBAL_VALIDATEDIR[512] = "DB/purgeable";
char GLOBAL_CONFSDIR[512] = "confs"; char GLOBAL_CONFSDIR[512] = "confs";
#ifdef __linux #ifdef __linux
int32_t IGUANA_NUMHELPERS = 1; int32_t IGUANA_NUMHELPERS = 8;
#else #else
int32_t IGUANA_NUMHELPERS = 1; int32_t IGUANA_NUMHELPERS = 1;
#endif #endif

Loading…
Cancel
Save