Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
b761987e78
  1. 17
      iguana/iguana_exchanges.c
  2. 2
      iguana/iguana_payments.c
  3. 4
      iguana/iguana_spendvectors.c
  4. 2
      iguana/iguana_unspents.c
  5. 11
      iguana/iguana_volatiles.c

17
iguana/iguana_exchanges.c

@ -715,22 +715,23 @@ char *exchanges777_process(struct exchange_info *exchange,int32_t *retvalp,struc
void exchanges777_loop(void *ptr)
{
struct peggy_info *PEGS; struct supernet_info *myinfo; struct exchange_info *exchange = ptr;
struct peggy_info *PEGS=0; struct supernet_info *myinfo; struct exchange_info *exchange = ptr;
int32_t flag,retval,i,peggyflag = 0; struct exchange_request *req; char *retstr;
myinfo = SuperNET_MYINFO(0);
if ( strcmp(exchange->name,"PAX") == 0 )
{
PEGS = myinfo->PEGS; //calloc(1,sizeof(*PEGS));
//PAX_init(PEGS);
exchange->privatedata = PEGS;
peggyflag = 1;
_crypto_update(PEGS,PEGS->cryptovols,&PEGS->data,1,peggyflag);
PEGS->lastupdate = (uint32_t)time(NULL);
if ( (PEGS= myinfo->PEGS) != 0 )
{
exchange->privatedata = PEGS;
peggyflag = 1;
_crypto_update(PEGS,PEGS->cryptovols,&PEGS->data,1,peggyflag);
PEGS->lastupdate = (uint32_t)time(NULL);
}
}
printf("exchanges loop.(%s)\n",exchange->name);
while ( 1 )
{
if ( peggyflag != 0 )
if ( peggyflag != 0 && PEGS != 0 )
{
printf("nonz peggy\n");
PAX_idle(PEGS,peggyflag,3);

2
iguana/iguana_payments.c

@ -299,7 +299,7 @@ cJSON *iguana_RTinputsjson(struct supernet_info *myinfo,struct iguana_info *coin
}
else
{
printf("illegal unspentind.u%d [%d]\n",outpt.unspentind,outpt.hdrsi);
printf("%s illegal unspentind.u%d [%d]\n",coin->symbol,outpt.unspentind,outpt.hdrsi);
free_json(vins);
return(0);
}

4
iguana/iguana_spendvectors.c

@ -173,9 +173,9 @@ struct iguana_bundle *iguana_externalspent(struct iguana_info *coin,bits256 *pre
} else printf("external spent unexpected nonz unspentind [%d]\n",spent_hdrsi);
}
if ( (spentbp= coin->bundles[hdrsi]) == 0 || hdrsi > spent_hdrsi )
printf("illegal hdrsi.%d when [%d] spentbp.%p\n",hdrsi,spent_hdrsi,spentbp);
printf("%s illegal hdrsi.%d when [%d] spentbp.%p\n",coin->symbol,hdrsi,spent_hdrsi,spentbp);
else if ( unspentind == 0 || unspentind >= spentbp->ramchain.H.data->numunspents )
printf("illegal unspentind.%d vs max.%d spentbp.%p[%d]\n",unspentind,spentbp->ramchain.H.data->numunspents,spentbp,hdrsi);
printf("%s illegal unspentind.%d vs max.%d spentbp.%p[%d]\n",coin->symbol,unspentind,spentbp->ramchain.H.data->numunspents,spentbp,hdrsi);
else return(spentbp);
iguana_bundleremove(coin,spent_hdrsi,1);
}

2
iguana/iguana_unspents.c

@ -913,7 +913,7 @@ uint64_t iguana_unspentavail(struct supernet_info *myinfo,struct iguana_info *co
}
else
{
printf("illegal unspentind.%u vs %u [%d]\n",outpt.unspentind,rdata->numunspents,bp->hdrsi);
printf("%s illegal unspentind.%u vs %u [%d]\n",coin->symbol,outpt.unspentind,rdata->numunspents,bp->hdrsi);
return(-2);
}
}

11
iguana/iguana_volatiles.c

@ -180,7 +180,7 @@ int32_t iguana_RTutxofunc(struct iguana_info *coin,int32_t *fromheightp,int32_t
}
else
{
printf("illegal unspentind.%u vs %u hdrs.%d\n",spentpt.unspentind,rdata->numunspents,spentpt.hdrsi);
printf("%s illegal unspentind.%u vs %u hdrs.%d\n",coin->symbol,spentpt.unspentind,rdata->numunspents,spentpt.hdrsi);
}
}
if ( lockflag != 0 )
@ -224,10 +224,13 @@ int32_t iguana_RTspentflag(struct supernet_info *myinfo,struct iguana_info *coin
spentflag = iguana_RTutxofunc(coin,&fromheight,&lockedflag,spentpt,&RTspentflag,0,0);
if ( RTspentflag != 0 )
*RTspendp += (amount == 0) ? coin->txfee : amount;
if ( spentflag != 0 && fromheight == 0 )
if ( spentflag != 0 )
{
printf("illegal unspentind.%u vs %u hdrs.%d zero fromheight?\n",spentpt.unspentind,numunspents,spentpt.hdrsi);
return(-1);
if ( height == 0 )
{
printf("%s illegal unspentind.%u vs %u hdrs.%d zero fromheight?\n",coin->symbol,spentpt.unspentind,numunspents,spentpt.hdrsi);
return(-1);
} else fromheight = height;
}
//printf("[%d] u%u %.8f, spentheight.%d vs height.%d spentflag.%d\n",spent_hdrsi,spent_unspentind,dstr(amount),fromheight,height,spentflag);
*spentheightp = fromheight;

Loading…
Cancel
Save