Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
879b49a014
  1. 2
      basilisk/basilisk.c
  2. 8
      iguana/iguana_realtime.c
  3. 4
      iguana/iguana_recv.c
  4. 2
      iguana/iguana_sign.c

2
basilisk/basilisk.c

@ -813,7 +813,9 @@ void basilisks_loop(void *arg)
if ( coin->relay_RTheights[i] != 0 )
break;
if ( i == BASILISK_MAXRELAYS || (time(NULL) % 60) == 0 )
{
basilisk_unspents_update(myinfo,coin);
}
}
}
//if ( (myinfo->RELAYID >= 0 || time(NULL) < myinfo->DEXactive) )

8
iguana/iguana_realtime.c

@ -18,7 +18,7 @@
void iguana_RTramchainfree(struct iguana_info *coin,struct iguana_bundle *bp)
{
int32_t hdrsi;
portable_mutex_lock(&coin->RTmutex);
//portable_mutex_lock(&coin->RTmutex);
if ( coin->utxotable != 0 )
{
printf("free RTramchain\n");
@ -40,7 +40,7 @@ void iguana_RTramchainfree(struct iguana_info *coin,struct iguana_bundle *bp)
coin->RTdatabad = 0;
printf("done RTramchain\n");
}
portable_mutex_unlock(&coin->RTmutex);
//portable_mutex_unlock(&coin->RTmutex);
}
void *iguana_ramchainfile(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_ramchain *dest,struct iguana_ramchain *R,struct iguana_bundle *bp,int32_t bundlei,struct iguana_block *block)
@ -69,7 +69,7 @@ void *iguana_ramchainfile(struct supernet_info *myinfo,struct iguana_info *coin,
void iguana_RTramchainalloc(char *fname,struct iguana_info *coin,struct iguana_bundle *bp)
{
uint32_t i,changed = 0; struct iguana_ramchaindata *rdata; struct iguana_ramchain *dest = &coin->RTramchain; struct iguana_blockRO *B; struct iguana_bundle *tmpbp;
portable_mutex_lock(&coin->RTmutex);
//portable_mutex_lock(&coin->RTmutex);
if ( (rdata= dest->H.data) != 0 )
{
i = 0;
@ -111,7 +111,7 @@ void iguana_RTramchainalloc(char *fname,struct iguana_info *coin,struct iguana_b
sleep(1);
}
}
portable_mutex_unlock(&coin->RTmutex);
//portable_mutex_unlock(&coin->RTmutex);
}
void iguana_rdataset(struct iguana_ramchain *dest,struct iguana_ramchaindata *rdest,struct iguana_ramchain *src)

4
iguana/iguana_recv.c

@ -1645,10 +1645,10 @@ int32_t iguana_processrecv(struct supernet_info *myinfo,struct iguana_info *coin
if ( coin->balanceflush != 0 )
{
fprintf(stderr,"%s call balanceflush\n",coin->symbol);
portable_mutex_lock(&coin->RTmutex);
//portable_mutex_lock(&coin->RTmutex);
if ( iguana_balanceflush(coin,coin->balanceflush) > 0 )
printf("balanceswritten.%d flushed coin->balanceflush %d vs %d coin->longestchain/coin->chain->bundlesize\n",coin->balanceswritten,coin->balanceflush,coin->longestchain/coin->chain->bundlesize);
portable_mutex_unlock(&coin->RTmutex);
//portable_mutex_unlock(&coin->RTmutex);
fprintf(stderr,"%s back balanceflush\n",coin->symbol);
coin->balanceflush = 0;
}

2
iguana/iguana_sign.c

@ -1099,7 +1099,7 @@ int32_t iguana_signrawtransaction(struct supernet_info *myinfo,struct iguana_inf
if ( (txobj= bitcoin_hex2json(coin,&txid,msgtx,rawtx,extraspace,extralen,serialized4)) != 0 )
{
//printf("txobj.(%s)\n",jprint(txobj,0));
if ( extralen == 0 && (checkstr= bitcoin_json2hex(myinfo,coin,&txid,txobj,0)) != 0 )
if ( (checkstr= bitcoin_json2hex(myinfo,coin,&txid,txobj,0)) != 0 )
{
if ( strcmp(rawtx,checkstr) != 0 )
{

Loading…
Cancel
Save