Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
0f2cd92117
  1. 2
      iguana/coins/btcd
  2. 2
      iguana/iguana_spendvectors.c
  3. 6
      iguana/iguana_tx.c
  4. 2
      iguana/iguana_txidfind.c
  5. 6
      iguana/iguana_unspents.c
  6. 2
      iguana/iguana_volatiles.c

2
iguana/coins/btcd

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTCD\",\"startpend\":128,\"endpend\":64,\"services\":129,\"maxpeers\":256,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":14631}"
curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTCD\",\"startpend\":18,\"endpend\":4,\"services\":129,\"maxpeers\":256,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":14631}"

2
iguana/iguana_spendvectors.c

@ -539,7 +539,7 @@ int32_t iguana_balancegen(struct iguana_info *coin,int32_t incremental,struct ig
{
if ( 0 && bp == coin->current )
printf("[%d] spendind.%u -> [%d] u%d\n",bp->hdrsi,spendind,spent_hdrsi,spent_unspentind);
if ( iguana_volatileupdate(coin,incremental,spentbp == coin->current ? &coin->RTramchain : &spentbp->ramchain,spent_hdrsi,spent_unspentind,spent_pkind,spent_value,spendind,h) < 0 )
if ( iguana_volatileupdate(coin,incremental,&spentbp->ramchain,spent_hdrsi,spent_unspentind,spent_pkind,spent_value,spendind,h) < 0 ) //spentbp == coin->current ? &coin->RTramchain :
errs++;
}
else //if ( Xspendinds != 0 )

6
iguana/iguana_tx.c

@ -72,7 +72,7 @@ int32_t iguana_vinset(struct iguana_info *coin,uint8_t *scriptspace,int32_t heig
memset(vin,0,sizeof(*vin));
if ( height >= 0 && height < coin->chain->bundlesize*coin->bundlescount && (bp= coin->bundles[height / coin->chain->bundlesize]) != 0 )
{
ramchain = (bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
ramchain = &bp->ramchain;//(bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
if ( (rdata= ramchain->H.data) != 0 && i < rdata->numspends )
{
S = RAMCHAIN_PTR(rdata,Soffset);
@ -125,7 +125,7 @@ int32_t iguana_voutset(struct iguana_info *coin,uint8_t *scriptspace,char *asmst
memset(vout,0,sizeof(*vout));
if ( height >= 0 && height < coin->chain->bundlesize*coin->bundlescount && (bp= coin->bundles[height / coin->chain->bundlesize]) != 0 )
{
ramchain = (bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
ramchain = &bp->ramchain;//(bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
if ( (rdata= ramchain->H.data) != 0 && i < tx->numvouts )
{
U = RAMCHAIN_PTR(rdata,Uoffset);
@ -139,7 +139,7 @@ int32_t iguana_voutset(struct iguana_info *coin,uint8_t *scriptspace,char *asmst
vout->value = u->value;
vout->pk_script = scriptspace;
scriptlen = iguana_voutscript(coin,bp,scriptspace,asmstr,u,&P[u->pkind],i);
} else printf("iguana_voutset unexpected path rdata.%p i.%d %d\n",rdata,i,tx->numvouts);
} else printf("iguana_voutset unexpected path [%d] rdata.%p i.%d %d\n",bp->hdrsi,rdata,i,tx->numvouts);
} else printf("vout error getting rdata.%p height.%d\n",rdata,height);
vout->pk_scriptlen = scriptlen;
if ( err != 0 )

2
iguana/iguana_txidfind.c

@ -277,7 +277,7 @@ struct iguana_txid *iguana_txidfind(struct iguana_info *coin,int32_t *heightp,st
{
if ( (bp= coin->bundles[i]) != 0 && (bp == coin->current || bp->emitfinish > 1) )
{
ramchain = (bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
ramchain = &bp->ramchain;//(bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
if ( (rdata= ramchain->H.data) != 0 )
{
if ( (TXbits= ramchain->txbits) == 0 )

6
iguana/iguana_unspents.c

@ -41,7 +41,7 @@ int32_t iguana_unspentindfind(struct iguana_info *coin,char *coinaddr,uint8_t *s
if ( pkind > 0 && pkind < rdata->numpkinds )
{
RTspend = 0;
if ( iguana_spentflag(coin,&RTspend,&spentheight,bp == coin->current ? &coin->RTramchain : &bp->ramchain,bp->hdrsi,unspentind,0,1,coin->longestchain,U[unspentind].value) == 0 )
if ( iguana_spentflag(coin,&RTspend,&spentheight,&bp->ramchain,bp->hdrsi,unspentind,0,1,coin->longestchain,U[unspentind].value) == 0 ) //bp == coin->current ? &coin->RTramchain :
{
if ( valuep != 0 )
*valuep = U[unspentind].value;
@ -410,7 +410,7 @@ int32_t iguana_uvaltxid(struct supernet_info *myinfo,bits256 *txidp,struct iguan
struct iguana_bundle *bp; struct iguana_unspent *U,*u; struct iguana_txid *T; struct iguana_ramchain *ramchain; struct iguana_ramchaindata *rdata;
if ( (bp= coin->bundles[hdrsi]) == 0 )
return(-1);
ramchain = (bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
ramchain = &bp->ramchain;//(bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
if ( (rdata= ramchain->H.data) != 0 )
{
U = RAMCHAIN_PTR(rdata,Uoffset);
@ -435,7 +435,7 @@ int64_t iguana_unspentavail(struct iguana_info *coin,uint64_t hdrsi_unspentind,i
return(-1);
hdrsi = (int16_t)(hdrsi_unspentind >> 32);
unspentind = (uint32_t)hdrsi_unspentind;
ramchain = (bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
ramchain = &bp->ramchain;//(bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
if ( (rdata= ramchain->H.data) == 0 )
return(0);
if ( (spentflag= iguana_spentflag(coin,&RTspend,&spentheight,ramchain,hdrsi,unspentind,0,minconf,maxconf,0)) > 0 )

2
iguana/iguana_volatiles.c

@ -88,7 +88,7 @@ struct iguana_utxo iguana_utxofind(struct iguana_info *coin,int16_t spent_hdrsi,
memset(&utxo,0,sizeof(utxo));
if ( (bp= coin->bundles[spent_hdrsi]) == 0 )
return(utxo);
ramchain = (bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
ramchain = &bp->ramchain;//(bp == coin->current) ? &coin->RTramchain : &bp->ramchain;
if ( (rdata= ramchain->H.data) == 0 )
return(utxo);
val = ((uint64_t)spent_hdrsi << 32) | spent_unspentind;

Loading…
Cancel
Save