Browse Source

test

etomic
jl777 8 years ago
parent
commit
7b86114969
  1. 4
      iguana/dpow/dpow_network.c
  2. 2
      iguana/iguana777.h
  3. 1
      iguana/main.c

4
iguana/dpow/dpow_network.c

@ -210,7 +210,7 @@ int32_t dpow_addnotary(struct supernet_info *myinfo,struct dpow_info *dp,char *i
char str[512]; uint32_t ipbits,*ptr; int32_t i,iter,n,retval = -1; char str[512]; uint32_t ipbits,*ptr; int32_t i,iter,n,retval = -1;
if ( myinfo->dpowsock >= 0 ) if ( myinfo->dpowsock >= 0 )
{ {
portable_mutex_lock(&myinfo->dpowmutex); portable_mutex_lock(&myinfo->notarymutex);
ipbits = (uint32_t)calc_ipbits(ipaddr); ipbits = (uint32_t)calc_ipbits(ipaddr);
for (iter=0; iter<2; iter++) for (iter=0; iter<2; iter++)
{ {
@ -247,7 +247,7 @@ int32_t dpow_addnotary(struct supernet_info *myinfo,struct dpow_info *dp,char *i
if ( dp == 0 ) if ( dp == 0 )
break; break;
} }
portable_mutex_unlock(&myinfo->dpowmutex); portable_mutex_unlock(&myinfo->notarymutex);
} }
return(retval); return(retval);
} }

2
iguana/iguana777.h

@ -110,7 +110,7 @@ struct supernet_info
void *PAXDATA; void *PAXDATA;
struct liquidity_info linfos[64]; struct liquidity_info linfos[64];
struct komodo_notaries NOTARY; struct komodo_notaries NOTARY;
char seedipaddr[64]; uint32_t dpowipbits[128]; int32_t numdpowipbits; portable_mutex_t dpowmutex; char seedipaddr[64]; uint32_t dpowipbits[128]; int32_t numdpowipbits; portable_mutex_t notarymutex,dpowmutex;
char dexseed_ipaddr[64]; uint32_t dexipbits[128]; int32_t numdexipbits; portable_mutex_t dexmutex; char dexseed_ipaddr[64]; uint32_t dexipbits[128]; int32_t numdexipbits; portable_mutex_t dexmutex;
// compatibility // compatibility
bits256 pangea_category,instantdex_category; bits256 pangea_category,instantdex_category;

1
iguana/main.c

@ -1611,6 +1611,7 @@ void iguana_main(void *arg)
strcpy(myinfo->rpcsymbol,"BTCD"); strcpy(myinfo->rpcsymbol,"BTCD");
iguana_urlinit(myinfo,ismainnet,usessl); iguana_urlinit(myinfo,ismainnet,usessl);
portable_mutex_init(&myinfo->dpowmutex); portable_mutex_init(&myinfo->dpowmutex);
portable_mutex_init(&myinfo->notarymutex);
if ( myinfo->IAMNOTARY == 0 ) if ( myinfo->IAMNOTARY == 0 )
{ {
#if LIQUIDITY_PROVIDER #if LIQUIDITY_PROVIDER

Loading…
Cancel
Save