Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
ac22f088e1
  1. 2
      crypto777/Makefile
  2. 2
      crypto777/bitcoind_RPC.c
  3. 2
      crypto777/m_LP
  4. 4
      iguana/Makefile
  5. 4
      iguana/iguana_exchanges.c
  6. 2
      iguana/iguana_realtime.c
  7. 4
      iguana/m_LP

2
crypto777/Makefile

@ -11,7 +11,7 @@ NACL_SDK_ROOT ?= $(abspath $(CURDIR))
TARGET = crypto777
EXTRA= -D__PNACL -O2
EXTRA= -D__PNACL -O2 -DLIQUIDITY_PROVIDER=1
#include $(NACL_SDK_ROOT)/tools/common.mk
include tools/common.mk

2
crypto777/bitcoind_RPC.c

@ -19,7 +19,7 @@
#define LIQUIDITY_PROVIDER 1
#endif
#ifdef LIQUIDITY_PROVIDER
#if LIQUIDITY_PROVIDER
#ifdef _WIN32
#include <curl.h>
#include <easy.h>

2
crypto777/m_LP

@ -1,4 +1,4 @@
git pull
rm *.o
gcc -c -DLIQUIDITY_PROVIDER -O2 *.c jpeg/*.c jpeg/unix/*.c -I/usr/lib/x86_64-linux-gnu/curl
gcc -c -DLIQUIDITY_PROVIDER=1 -O2 *.c jpeg/*.c jpeg/unix/*.c -I/usr/lib/x86_64-linux-gnu/curl
rm -f ../agents/libcrypto777.a; ar rcu ../agents/libcrypto777.a *.o

4
iguana/Makefile

@ -26,9 +26,9 @@ DEPS = nacl_io
#LIBS = crypto777 curl ssl crypto z pthread ppapi nacl_io
#DEPS = nacl_io
#LIBS = crypto777 curl ssl crypto z glibc-compat nacl_spawn ppapi nacl_io ppapi_simple # cli_main ppapi_cpp ppapi_simple
LIBS = crypto777 glibc-compat nacl_spawn ppapi nacl_io #ppapi_simple
LIBS = crypto777 curl ssl crypto z glibc-compat nacl_spawn ppapi nacl_io ppapi_simple
CFLAGS = -Wall -O2 -fno-strict-aliasing $(EXTRA)
CFLAGS = -Wall -O2 -DLIQUIDITY_PROVIDER=1 -fno-strict-aliasing $(EXTRA)
LFLAGS = libs
# Build rules generated by macros from common.mk:

4
iguana/iguana_exchanges.c

@ -84,14 +84,14 @@ double instantdex_aveprice(struct supernet_info *myinfo,struct exchange_quote *s
else if ( dir > 0 && active[i]->numasks > 0 )
n = instantdex_updatesources(active[i]->exchange,sortbuf,n,max,i,-1,&active[i]->bidasks[1],active[i]->numasks);
}
printf("numexchanges.%d dir.%d %s/%s numX.%d n.%d\n",myinfo->numexchanges,dir,base,rel,num,n);
//printf("numexchanges.%d dir.%d %s/%s numX.%d n.%d\n",myinfo->numexchanges,dir,base,rel,num,n);
if ( dir < 0 )
revsort64s(&sortbuf[0].satoshis,n,sizeof(*sortbuf));
else sort64s(&sortbuf[0].satoshis,n,sizeof(*sortbuf));
for (totalvol=pricesum=i=0; i<n && totalvol < basevolume; i++)
{
quote = sortbuf[i];
printf("n.%d i.%d price %.8f %.8f %.8f\n",n,i,dstr(sortbuf[i].satoshis),sortbuf[i].price,quote.volume);
//printf("n.%d i.%d price %.8f %.8f %.8f\n",n,i,dstr(sortbuf[i].satoshis),sortbuf[i].price,quote.volume);
if ( quote.satoshis != 0 )
{
pricesum += (quote.price * quote.volume);

2
iguana/iguana_realtime.c

@ -296,7 +296,7 @@ int32_t iguana_realtime_update(struct supernet_info *myinfo,struct iguana_info *
if ( (block= iguana_bundleblock(coin,&hash2,bp,bundlei)) != 0 )
{
iguana_bundlehashadd(coin,bp,bundlei,block);
printf("RT.%d vs hwm.%d starti.%d bp->n %d block.%p/%p ramchain.%p databad.%d prevnonz.%d\n",coin->RTheight,coin->blocks.hwmchain.height,coin->RTstarti,bp->n,block,bp->blocks[bundlei],dest->H.data,coin->RTdatabad,bits256_nonz(block->RO.prev_block));
//printf("RT.%d vs hwm.%d starti.%d bp->n %d block.%p/%p ramchain.%p databad.%d prevnonz.%d\n",coin->RTheight,coin->blocks.hwmchain.height,coin->RTstarti,bp->n,block,bp->blocks[bundlei],dest->H.data,coin->RTdatabad,bits256_nonz(block->RO.prev_block));
}
else
{

4
iguana/m_LP

@ -2,6 +2,6 @@
rm ../agents/iguana *.o
git pull
cd secp256k1; ./m_unix; cd ..
gcc -g -Wno-deprecated -c -O2 *.c ../basilisk/basilisk.c ../gecko/gecko.c ../datachain/datachain.c
gcc -g -Wno-deprecated -c main.c iguana777.c iguana_bundles.c ../basilisk/basilisk.c
gcc -g -Wno-deprecated -c -O2 -DLIQUIDITY_PROVIDER=1 *.c ../basilisk/basilisk.c ../gecko/gecko.c ../datachain/datachain.c
gcc -g -Wno-deprecated -c -DLIQUIDITY_PROVIDER=1 main.c iguana777.c iguana_bundles.c ../basilisk/basilisk.c
gcc -g -o ../agents/iguana *.o ../agents/libcrypto777.a -lcurl -lssl -lcrypto -lpthread -lz -lm

Loading…
Cancel
Save