jl777 8 years ago
parent
commit
b7b830a345
  1. 6
      iguana/iguana_peers.c
  2. 4
      iguana/iguana_ramchain.c

6
iguana/iguana_peers.c

@ -393,7 +393,7 @@ int32_t iguana_socket(int32_t bindflag,char *hostname,uint16_t port)
//printf("keepalive.%d\n",opt); //printf("keepalive.%d\n",opt);
} }
setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(void *)&opt,sizeof(opt)); setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(void *)&opt,sizeof(opt));
#ifdef __APPLE__ #ifndef WIN2 //__APPLE__
setsockopt(sock,SOL_SOCKET,SO_NOSIGPIPE,&opt,sizeof(opt)); setsockopt(sock,SOL_SOCKET,SO_NOSIGPIPE,&opt,sizeof(opt));
#endif #endif
#endif #endif
@ -447,14 +447,14 @@ int32_t iguana_socket(int32_t bindflag,char *hostname,uint16_t port)
return(-1); return(-1);
} }
} }
#ifdef __APPLE__ //#ifdef __APPLE__
timeout.tv_sec = 0; timeout.tv_sec = 0;
timeout.tv_usec = 30000; timeout.tv_usec = 30000;
setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(void *)&timeout,sizeof(timeout)); setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(void *)&timeout,sizeof(timeout));
timeout.tv_sec = 0; timeout.tv_sec = 0;
timeout.tv_usec = 10000; timeout.tv_usec = 10000;
setsockopt(sock,SOL_SOCKET,SO_SNDTIMEO,(void *)&timeout,sizeof(timeout)); setsockopt(sock,SOL_SOCKET,SO_SNDTIMEO,(void *)&timeout,sizeof(timeout));
#endif //#endif
return(sock); return(sock);
} }

4
iguana/iguana_ramchain.c

@ -2372,10 +2372,10 @@ int64_t iguana_ramchainopen(char *fname,struct iguana_info *coin,struct iguana_r
if ( rdata->scriptspace > scriptspace ) if ( rdata->scriptspace > scriptspace )
scriptspace = rdata->scriptspace; scriptspace = rdata->scriptspace;
} }
#ifndef __APPLE__ //#ifndef __APPLE__
numtxids *= 1.25; numexternaltxids *= 1.25, scriptspace *= 1.25; numtxids *= 1.25; numexternaltxids *= 1.25, scriptspace *= 1.25;
numunspents *= 1.25, numspends *= 1.25, numpkinds *= 1.25; numunspents *= 1.25, numspends *= 1.25, numpkinds *= 1.25;
#endif //#endif
if ( mem->ptr == 0 ) if ( mem->ptr == 0 )
{ {
while ( (allocsize= _iguana_rdata_action(fname,0,0,0,0,1,numtxids,numunspents,numspends,numpkinds,numexternaltxids,scriptspace,0,0,0,0,0,RAMCHAIN_ARG,numblocks,coin->chain->zcash)) > 2*1024LL*1024L*1024L ) while ( (allocsize= _iguana_rdata_action(fname,0,0,0,0,1,numtxids,numunspents,numspends,numpkinds,numexternaltxids,scriptspace,0,0,0,0,0,RAMCHAIN_ARG,numblocks,coin->chain->zcash)) > 2*1024LL*1024L*1024L )

Loading…
Cancel
Save