Browse Source

test

etomic
jl777 8 years ago
parent
commit
1045ad9162
  1. 2
      iguana/dpow/dpow_network.c
  2. 4
      iguana/tests/dexcheckaddress
  3. 1
      includes/iguana_apideclares.h

2
iguana/dpow/dpow_network.c

@ -355,7 +355,7 @@ char *_dex_reqsend(struct supernet_info *myinfo,char *handler,uint8_t *data,int3
// printf("%02x",((uint8_t *)data)[i]); // printf("%02x",((uint8_t *)data)[i]);
if ( (recvbytes= signed_nn_recv(&freeptr,myinfo->ctx,myinfo->notaries,myinfo->numnotaries,myinfo->reqsock,&retptr)) >= 0 ) if ( (recvbytes= signed_nn_recv(&freeptr,myinfo->ctx,myinfo->notaries,myinfo->numnotaries,myinfo->reqsock,&retptr)) >= 0 )
{ {
printf("req returned.[%d]\n",recvbytes); //printf("req returned.[%d]\n",recvbytes);
portable_mutex_lock(&myinfo->dexmutex); portable_mutex_lock(&myinfo->dexmutex);
ipbits = 0; ipbits = 0;
if ( strcmp(handler,"DEX") == 0 ) if ( strcmp(handler,"DEX") == 0 )

4
iguana/tests/dexcheckaddress

@ -0,0 +1,4 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"checkaddress\",\"address\":\"1Hgzt5xsnbfc8UTWqWKSTLRm5bEYHYBoCE\",\"symbol\":\"BTC\"}"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"checkaddress\",\"address\":\"RRyBxbrAPRUBCUpiJgJZYrkxqrh8x5ta9Z\",\"symbol\":\"USD\"}"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"checkaddress\",\"address\":\"RRyBxbrAPRUBCUpiJgJZYrkxqrh8x5ta9Z\",\"symbol\":\"MVP\"}"

1
includes/iguana_apideclares.h

@ -39,6 +39,7 @@ HASH_AND_STRING(dex,getblock,hash,symbol);
TWO_STRINGS(dex,sendrawtransaction,symbol,signedtx); TWO_STRINGS(dex,sendrawtransaction,symbol,signedtx);
HASH_AND_STRING_AND_INT(dex,gettxout,txid,symbol,vout); HASH_AND_STRING_AND_INT(dex,gettxout,txid,symbol,vout);
TWO_STRINGS(dex,importaddress,symbol,address); TWO_STRINGS(dex,importaddress,symbol,address);
TWO_STRINGS(dex,checkaddress,symbol,address);
TWO_STRINGS(dex,validateaddress,symbol,address); TWO_STRINGS(dex,validateaddress,symbol,address);
TWO_STRINGS(dex,listunspent,symbol,address); TWO_STRINGS(dex,listunspent,symbol,address);
TWO_STRINGS_AND_TWO_DOUBLES(dex,listtransactions,symbol,address,count,skip); TWO_STRINGS_AND_TWO_DOUBLES(dex,listtransactions,symbol,address,count,skip);

Loading…
Cancel
Save