Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
78db4db5fb
  1. 10
      README.md
  2. 2
      iguana/iguana777.c
  3. 2
      iguana/iguana_bundles.c
  4. 1
      iguana/iguana_instantdex.c
  5. 1
      iguana/iguana_sign.c
  6. 17
      iguana/index.html
  7. 2
      iguana/main.c
  8. 2
      iguana/tests/buy
  9. 2
      iguana/tests/sell

10
README.md

@ -13,12 +13,6 @@
*** all external dependencies have been removed, except for -lpthread and -lm
#DEPENDENCIES#
##for native (unix, osx)##
Just make sure you have the dev versions of openssl and curl installed:
```sudo apt-get install libcurl4-gnutls-dev libssl-dev```
##For native (win32, win64)##
TOOL_DIR := /usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin
MINGW := i586-mingw32
@ -26,7 +20,7 @@ The above two definitions need to be changed to match the mingw install on your
##For chrome app##
You need to make sure the nacl sdk is properly installed and you are able to build the examples.
Now you will need to get the external libs, which can be built from scratch using naclports or there use the reference builds of libssl.a, libcrypto.a, libcurl.a and libz.a in the SuperNET/crypto777/pnacl_libs. You can just copy those over into $(NACL_SDK_ROOT)/<pepper_dir>/lib/pnacl.
Now you will need to get the external libs, which can be built from scratch using naclports or there use the reference builds of libcurl.a and libz.a in the SuperNET/crypto777/pnacl_libs. You can just copy those over into $(NACL_SDK_ROOT)/<pepper_dir>/lib/pnacl.
#ONETIME#
@ -130,7 +124,7 @@ During the syncing, I have many, many messages like this:
>> cant create.(tmp/BTC/252000/.tmpmarker) errno.24 Too many open files
>> cant create.(tmp/BTC/18000/.tmpmarker) errno.24 Too many open files
>>
Loretta:/Users/volker/SuperNET # ulimit -n 2048
Loretta:/Users/volker/SuperNET # ulimit -n 100000
##### tests

2
iguana/iguana777.c

@ -831,7 +831,7 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
else if ( coin->endPEND < 2 )
coin->endPEND = 2;
#ifdef __PNACL__
//coin->startPEND = coin->endPEND = 1;
coin->startPEND = coin->endPEND = 1;
#endif
coin->enableCACHE = 0;//(strcmp("BTC",coin->symbol) != 0);
if ( jobj(json,"cache") != 0 )

2
iguana/iguana_bundles.c

@ -775,7 +775,7 @@ int32_t iguana_bundleready(struct iguana_info *coin,struct iguana_bundle *bp,int
char str[65];
if ( requiredflag != 0 )
printf(">>>>>>> block contents error at ht.%d [%d:%d]\n",bp->bundleheight+i,bp->hdrsi,i);
if ( bits256_nonz(block->RO.hash2) != 0 )
if ( 0 && bits256_nonz(block->RO.hash2) != 0 )
printf("patch.%d and reissue prev.%s %d\n",bp->bundleheight+i,bits256_str(str,block->RO.prev_block),i);
iguana_blockunmark(coin,block,bp,i,1);
}

1
iguana/iguana_instantdex.c

@ -1509,6 +1509,7 @@ cJSON *instantdex_reportjson(cJSON *item,char *name)
jadd(newjson,name,jduplicate(jobj(item,"price")));
jadd(newjson,"volume",jduplicate(jobj(item,"volume")));
jadd(newjson,"orderid",jduplicate(jobj(item,"orderid")));
jadd(newjson,"account",jduplicate(jobj(item,"offerer")));
jaddnum(newjson,"date",dateval);
jaddnum(newjson,"s",dateval % 60);
jaddnum(newjson,"m",(dateval / 60) % 60);

1
iguana/iguana_sign.c

@ -16,6 +16,7 @@
#include "iguana777.h"
#include "exchanges/bitcoin.h"
// make sure coinbase outputs are matured
int32_t iguana_vinparse(struct iguana_info *coin,int32_t rwflag,uint8_t *serialized,struct iguana_msgvin *msg)
{

17
iguana/index.html

@ -52,6 +52,8 @@ var chart = AmCharts.makeChart("chartdiv",
var startButton = document.getElementById('start');
var endButton = document.getElementById('stop');
var buyButton = document.getElementById('buy');
var sellButton = document.getElementById('sell');
/*
var BTCbutton = document.getElementById('BTC');
var CNYbutton = document.getElementById('CNY');
@ -75,8 +77,6 @@ var NZDbutton = document.getElementById('NZD');
CNYbutton.addEventListener('click', CNYrel);
BTCbutton.addEventListener('click', BTCrel);
*/
var BTCDbutton = document.getElementById('BTCD');
var VPNbutton = document.getElementById('VPN');
@ -92,7 +92,8 @@ var NXTprivacybutton = document.getElementById('NXTprivacy');
startButton.addEventListener('click', startDemo);
endButton.addEventListener('click', endDemo);
buyButton.addEventListener('click', buyaction);
sellButton.addEventListener('click', sellaction);
BTCDbutton.addEventListener('click', BTCDbase);
VPNbutton.addEventListener('click', VPNbase);
@ -146,6 +147,14 @@ function endDemo() {
clearInterval(interval);
}
function buyaction() {
alert("need to do market buy");
}
function sellaction() {
alert("need to do market sell");
}
function getDataFromServer()
{
var i,newData = [];
@ -718,6 +727,8 @@ data-path="{tc}/{config}">
<button id="Tradebots">Tradebots</button>
<button id="Pangea">Pangea</button>
<button id="NXTprivacy">NXTprivacy</button>
<button id="buy">BUY</button>
<button id="sell">SELL</button>
<div id="chartdiv"></div>
</div>

2
iguana/main.c

@ -71,7 +71,7 @@ int32_t HDRnet,netBLOCKS;
cJSON *API_json;
#ifdef __PNACL__
char GLOBAL_TMPDIR[512] = "/DB/tmp2";
char GLOBAL_TMPDIR[512] = "/tmp";
char GLOBAL_DBDIR[512] = "/DB";
char GLOBAL_HELPDIR[512] = "/DB/help";
char GLOBAL_VALIDATEDIR[512] = "/DB/purgeable";

2
iguana/tests/buy

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"dotrade\":1,\"agent\":\"InstantDEX\",\"exchange\":\"bitcoin\",\"method\":\"buy\",\"base\":\"BTCD\",\"rel\":\"BTC\",\"price\":0.0025,\"volume\":1.0}"
curl --url "http://127.0.0.1:7778" --data "{\"dotrade\":1,\"agent\":\"InstantDEX\",\"exchange\":\"bitcoin\",\"method\":\"buy\",\"base\":\"BTCD\",\"rel\":\"BTC\",\"price\":0.0027,\"volume\":1.0}"

2
iguana/tests/sell

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"dotrade\":1,\"agent\":\"InstantDEX\",\"exchange\":\"bitcoin\",\"method\":\"sell\",\"base\":\"BTCD\",\"rel\":\"BTC\",\"price\":0.0025,\"volume\":1.0}"
curl --url "http://127.0.0.1:7778" --data "{\"dotrade\":1,\"agent\":\"InstantDEX\",\"exchange\":\"bitcoin\",\"method\":\"sell\",\"base\":\"BTCD\",\"rel\":\"BTC\",\"price\":0.0029,\"volume\":1.0}"

Loading…
Cancel
Save