jl777 7 years ago
parent
commit
70736e4ab3
  1. 4
      iguana/dpow/dpow_fsm.c
  2. 1
      iguana/iguana_init.c
  3. 2
      includes/iguana_structs.h

4
iguana/dpow/dpow_fsm.c

@ -401,10 +401,10 @@ void dpow_statemachinestart(void *ptr)
else if ( strcmp(dest->symbol,"KMD") == 0 ) else if ( strcmp(dest->symbol,"KMD") == 0 )
{ {
kmdheight = dest->longestchain; kmdheight = dest->longestchain;
portable_mutex_lock(&myinfo->MoM_mutex); portable_mutex_lock(&dest->MoM_mutex);
//if ( Notaries_port != DPOW_SOCKPORT ) //if ( Notaries_port != DPOW_SOCKPORT )
MoM = dpow_calcMoM(&MoMdepth,myinfo,src,checkpoint.blockhash.height); MoM = dpow_calcMoM(&MoMdepth,myinfo,src,checkpoint.blockhash.height);
portable_mutex_unlock(&myinfo->MoM_mutex); portable_mutex_unlock(&dest->MoM_mutex);
} }
if ( (bp= dp->blocks[checkpoint.blockhash.height]) == 0 ) if ( (bp= dp->blocks[checkpoint.blockhash.height]) == 0 )
{ {

1
iguana/iguana_init.c

@ -68,6 +68,7 @@ void iguana_initcoin(struct iguana_info *coin,cJSON *argjson)
portable_mutex_init(&coin->RTmutex); portable_mutex_init(&coin->RTmutex);
portable_mutex_init(&coin->kmdmutex); portable_mutex_init(&coin->kmdmutex);
portable_mutex_init(&coin->peers_mutex); portable_mutex_init(&coin->peers_mutex);
portable_mutex_init(&coin->MoM_mutex);
portable_mutex_init(&coin->blocks_mutex); portable_mutex_init(&coin->blocks_mutex);
portable_mutex_init(&coin->special_mutex); portable_mutex_init(&coin->special_mutex);
portable_mutex_init(&coin->allcoins_mutex); portable_mutex_init(&coin->allcoins_mutex);

2
includes/iguana_structs.h

@ -511,7 +511,7 @@ struct iguana_info
struct OS_memspace TXMEM,MEM,MEMB[IGUANA_MAXBUNDLESIZE]; struct OS_memspace TXMEM,MEM,MEMB[IGUANA_MAXBUNDLESIZE];
queue_t acceptQ,hdrsQ,blocksQ,priorityQ,possibleQ,cacheQ,recvQ,msgrequestQ,jsonQ,finishedQ; queue_t acceptQ,hdrsQ,blocksQ,priorityQ,possibleQ,cacheQ,recvQ,msgrequestQ,jsonQ,finishedQ;
double parsemillis,avetime; uint32_t Launched[8],Terminated[8]; double parsemillis,avetime; uint32_t Launched[8],Terminated[8];
portable_mutex_t peers_mutex,blocks_mutex,special_mutex,RTmutex,allcoins_mutex; portable_mutex_t peers_mutex,blocks_mutex,special_mutex,RTmutex,allcoins_mutex,MoM_mutex;
char changeaddr[64]; char changeaddr[64];
struct iguana_bundle *bundles[IGUANA_MAXBUNDLES],*current,*lastpending; struct iguana_bundle *bundles[IGUANA_MAXBUNDLES],*current,*lastpending;
struct OS_memspace RTrawmem,RTmem,RThashmem; // struct iguana_ramchain RTramchain; struct OS_memspace RTrawmem,RTmem,RThashmem; // struct iguana_ramchain RTramchain;

Loading…
Cancel
Save