jl777 8 years ago
parent
commit
0b15e58b29
  1. 1
      iguana/iguana_ramchain.c
  2. 8
      iguana/iguana_recv.c

1
iguana/iguana_ramchain.c

@ -828,7 +828,6 @@ int64_t _iguana_rdata_action(char *fname,FILE *fp,bits256 lhashes[IGUANA_NUMLHAS
S = iguana_ramchain_offset(fname,rdata,RAMCHAIN_LARG(IGUANA_LHASH_SPENDS),fparg,fpos,S,&offset,(sizeof(struct iguana_spend256) * numspends),srcsize);
}
Kspace = iguana_ramchain_offset(fname,rdata,RAMCHAIN_LARG(IGUANA_LHASH_KSPACE),fparg,fpos,Kspace,&offset,scriptspace,srcsize); // at the end so it can be truncated
printf("offset.%d vs alloc.%d\n",(int32_t)offset,(int32_t)srcsize);
if ( (fparg= fp) == 0 )
break;
lhashes = 0;

8
iguana/iguana_recv.c

@ -843,6 +843,13 @@ void iguana_gotblockM(struct supernet_info *myinfo,struct iguana_info *coin,stru
}
}
txdata = origtxdata;
static portable_mutex_t mutex; static int32_t didinit;
if ( didinit == 0 )
{
portable_mutex_init(&mutex);
didinit = 1;
}
portable_mutex_lock(&mutex);
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;
@ -888,6 +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);
queue_enqueue("recvQ",&coin->recvQ,&req->DL);
}
portable_mutex_unlock(&mutex);
}
void iguana_gottxidsM(struct iguana_info *coin,struct iguana_peer *addr,bits256 *txids,int32_t n)

Loading…
Cancel
Save