Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
33aec50a14
  1. 9
      basilisk/basilisk_swap.c
  2. 8
      iguana/iguana777.c
  3. 5
      iguana/iguana_spendvectors.c

9
basilisk/basilisk_swap.c

@ -581,16 +581,15 @@ int32_t basilisk_rawtx_return(struct supernet_info *myinfo,int32_t height,struct
int32_t basilisk_rawtx_gen(char *str,struct supernet_info *myinfo,int32_t iambob,int32_t lockinputs,struct basilisk_rawtx *rawtx,uint32_t locktime,uint8_t *script,int32_t scriptlen,int64_t txfee,int32_t minconf) int32_t basilisk_rawtx_gen(char *str,struct supernet_info *myinfo,int32_t iambob,int32_t lockinputs,struct basilisk_rawtx *rawtx,uint32_t locktime,uint8_t *script,int32_t scriptlen,int64_t txfee,int32_t minconf)
{ {
struct iguana_waddress *waddr; struct iguana_waccount *wacct; char coinaddr[64],wifstr[64],*retstr,scriptstr[1024]; uint32_t basilisktag; int32_t flag,i,n,retval = -1; cJSON *valsobj,*retarray=0,*privkeyarray,*addresses; struct iguana_waddress *waddr; struct iguana_waccount *wacct; char coinaddr[64],wifstr[64],*retstr,scriptstr[1024]; uint32_t basilisktag; int32_t flag,i,n,retval = -1; cJSON *valsobj,*retarray=0,*privkeyarray,*addresses;
if ( (waddr= iguana_getaccountaddress(myinfo,rawtx->coin,0,0,rawtx->coin->changeaddr,"change")) == 0 ) //if ( (waddr= iguana_getaccountaddress(myinfo,rawtx->coin,0,0,rawtx->coin->changeaddr,"change")) == 0 )
if ( rawtx->coin->changeaddr[0] == 0 )
{ {
printf("no change addr error\n"); bitcoin_address(rawtx->coin->changeaddr,rawtx->coin->chain->pubtype,myinfo->persistent_pubkey33,33);
return(-1); printf("set change address.(%s)\n",rawtx->coin->changeaddr);
} }
init_hexbytes_noT(scriptstr,script,scriptlen); init_hexbytes_noT(scriptstr,script,scriptlen);
privkeyarray = cJSON_CreateArray(); privkeyarray = cJSON_CreateArray();
addresses = cJSON_CreateArray(); addresses = cJSON_CreateArray();
if ( rawtx->coin->changeaddr[0] == 0 )
bitcoin_address(rawtx->coin->changeaddr,rawtx->coin->chain->pubtype,waddr->rmd160,20);
bitcoin_address(coinaddr,rawtx->coin->chain->pubtype,myinfo->persistent_pubkey33,33); bitcoin_address(coinaddr,rawtx->coin->chain->pubtype,myinfo->persistent_pubkey33,33);
//printf("%s persistent.(%s) (%s) change.(%s) scriptstr.(%s)\n",coin->symbol,myinfo->myaddr.BTC,coinaddr,coin->changeaddr,scriptstr); //printf("%s persistent.(%s) (%s) change.(%s) scriptstr.(%s)\n",coin->symbol,myinfo->myaddr.BTC,coinaddr,coin->changeaddr,scriptstr);
if ( (waddr= iguana_waddresssearch(myinfo,&wacct,coinaddr)) != 0 ) if ( (waddr= iguana_waddresssearch(myinfo,&wacct,coinaddr)) != 0 )

8
iguana/iguana777.c

@ -830,8 +830,8 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
} }
if ( coin->startPEND > maxval*mult ) if ( coin->startPEND > maxval*mult )
coin->startPEND = maxval*mult; coin->startPEND = maxval*mult;
else if ( coin->startPEND < 2 ) else if ( coin->startPEND < 1 )
coin->startPEND = 2; coin->startPEND = 1;
coin->MAXBUNDLES = coin->startPEND; coin->MAXBUNDLES = coin->startPEND;
if ( (coin->endPEND= juint(json,"endpend")) == 0 ) if ( (coin->endPEND= juint(json,"endpend")) == 0 )
{ {
@ -841,8 +841,8 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
} }
if ( coin->endPEND > maxval*mult ) if ( coin->endPEND > maxval*mult )
coin->endPEND = maxval*mult; coin->endPEND = maxval*mult;
else if ( coin->endPEND < 2 ) else if ( coin->endPEND < 1 )
coin->endPEND = 2; coin->endPEND = 1;
#ifdef __PNACL__ #ifdef __PNACL__
coin->startPEND = coin->endPEND = 1; coin->startPEND = coin->endPEND = 1;
#endif #endif

5
iguana/iguana_spendvectors.c

@ -1108,8 +1108,9 @@ int32_t iguana_bundlevalidate(struct iguana_info *coin,struct iguana_bundle *bp,
free(blockspace); free(blockspace);
bp->validated = (uint32_t)time(NULL); bp->validated = (uint32_t)time(NULL);
printf("VALIDATED.[%d] ht.%d duration.%d errs.%d total.%lld %u | total errs.%d validated.%d %llx\n",bp->hdrsi,bp->bundleheight,bp->validated - now,errs,(long long)total,bp->validated,totalerrs,totalvalidated,(long long)validatehash.txid); printf("VALIDATED.[%d] ht.%d duration.%d errs.%d total.%lld %u | total errs.%d validated.%d %llx\n",bp->hdrsi,bp->bundleheight,bp->validated - now,errs,(long long)total,bp->validated,totalerrs,totalvalidated,(long long)validatehash.txid);
if ( bp == coin->current ) iguana_volatilesmap(coin,&bp->ramchain);
coin->RTdatabad = -1; //if ( bp == coin->current )
// coin->RTdatabad = -1;
} }
if ( errs == 0 && fp == 0 ) if ( errs == 0 && fp == 0 )
{ {

Loading…
Cancel
Save