Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
977ce4024c
  1. 2
      iguana/iguana777.h
  2. 6
      iguana/iguana_payments.c
  3. 4
      iguana/iguana_realtime.c
  4. 2
      iguana/secp256k1/src/modules/rangeproof/borromean_impl.h

2
iguana/iguana777.h

@ -508,7 +508,7 @@ struct iguana_info
struct iguana_bundle *bundles[IGUANA_MAXBUNDLES],*current,*lastpending;
struct iguana_ramchain RTramchain; struct OS_memspace RTmem,RThashmem; bits256 RThash1;
int32_t numremain,numpendings,zcount,recvcount,bcount,pcount,lastbundle,numsaved,pendbalances,numverified,blockdepth;
uint32_t recvtime,hdrstime,backstoptime,lastbundletime,numreqsent,numbundlesQ,lastbundleitime,lastdisp,RTgenesis,RTstarti,idletime,stucktime,stuckmonitor,maxstuck,lastreqtime,RThdrstime;
uint32_t recvtime,hdrstime,backstoptime,lastbundletime,numreqsent,numbundlesQ,lastbundleitime,lastdisp,RTgenesis,firstRTgenesis,RTstarti,idletime,stucktime,stuckmonitor,maxstuck,lastreqtime,RThdrstime;
double bandwidth,maxbandwidth,backstopmillis; bits256 backstophash2; int64_t spaceused;
int32_t initialheight,mapflags,minconfirms,numrecv,bindsock,isRT,backstop,blocksrecv,merging,polltimeout,numreqtxids,allhashes,balanceflush; bits256 reqtxids[64];
void *launched,*started,*rpcloop;

6
iguana/iguana_payments.c

@ -160,7 +160,7 @@ cJSON *iguana_scriptobj(struct iguana_info *coin,uint8_t rmd160[20],char *coinad
char *sendtoaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *coinaddr,uint64_t satoshis,char *comment,char *comment2,int32_t minconf,char *account)
{
uint8_t addrtype,rmd160[20]; int32_t i,j,numwaddrs,numunspents=0; struct iguana_waddress **waddrs,*waddr; uint64_t *unspents;
uint8_t addrtype,rmd160[20]; int32_t i,j,numwaddrs,numunspents=0; struct iguana_waddress **waddrs,*waddr; uint64_t *unspents; //struct iguana_msgtx msgtx; char *rawtx=0,*signedtx = 0; bits256 signedtxid; cJSON *vins=0,*privkeys=0;
//sendtoaddress <bitcoinaddress> <amount> [comment] [comment-to] <amount> is a real and is rounded to 8 decimal places. Returns the transaction ID <txid> if successful. Y
if ( coinaddr != 0 && coinaddr[0] != 0 && satoshis != 0 )
{
@ -182,6 +182,10 @@ char *sendtoaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *
}
}
printf("need to generate send %.8f to %s [%s] [%s] using numaddrs.%d numunspents.%d\n",dstr(satoshis),coinaddr,comment!=0?comment:"",comment2!=0?comment2:"",numwaddrs,numunspents);
/*if ( iguana_signrawtransaction(myinfo,coin,&msgtx,&signedtx,&signedtxid,struct vin_info *V,int32_t numinputs,rawtx,vins,privkeys) > 0 )
{
}*/
}
return(clonestr("{\"error\":\"need address and amount\"}"));
}

4
iguana/iguana_realtime.c

@ -190,8 +190,8 @@ void iguana_RTspendvectors(struct iguana_info *coin,struct iguana_bundle *bp)
bp->converted = (uint32_t)time(NULL);
if ( iguana_balancegen(coin,1,bp,coin->RTstarti,coin->RTheight > 0 ? coin->RTheight-1 : bp->n-1,orignumemit) < 0 )
coin->RTdatabad = 1;
else if ( coin->RTgenesis == 0 )
printf(">>>>>> IGUANA %s READY FOR REALTIME RPC <<<<<<\n",coin->symbol);
else if ( coin->RTgenesis == 0 && coin->firstRTgenesis == 0 )
coin->firstRTgenesis++, printf(">>>>>> IGUANA %s READY FOR REALTIME RPC <<<<<<\n",coin->symbol);
//printf("iguana_balancegen [%d] (%d to %d)\n",bp->hdrsi,coin->RTstarti,(coin->RTheight-1)%bp->n);
coin->RTstarti = (coin->RTheight % bp->n);
}

2
iguana/secp256k1/src/modules/rangeproof/borromean_impl.h

@ -74,7 +74,7 @@ int secp256k1_borromean_verify(const secp256k1_ecmult_context *ecmult_ctx,secp25
{
if (overflow || secp256k1_scalar_is_zero(&s[count]) || secp256k1_scalar_is_zero(&ens) || secp256k1_gej_is_infinity(&pubs[count]))
return 0;
if (evalues) // If requested, save the challenges for proof rewind.*/
if (evalues) // If requested, save the challenges for proof rewind
evalues[count] = ens;
secp256k1_ecmult(ecmult_ctx, &rgej, &pubs[count], &ens, &s[count]);
if (secp256k1_gej_is_infinity(&rgej))

Loading…
Cancel
Save