test1 8 years ago
parent
commit
7e70228178
  1. 1
      basilisk/basilisk.c
  2. 1
      iguana/iguana_exchanges.c
  3. 28
      iguana/iguana_json.c
  4. 1
      iguana/iguana_notary.c
  5. 1
      iguana/iguana_payments.c
  6. 1
      iguana/iguana_tradebots.c
  7. 1
      iguana/iguana_unspents.c
  8. 1
      iguana/iguana_wallet.c
  9. 1
      iguana/main.c
  10. 1
      iguana/ramchain_api.c
  11. 4
      includes/iguana_apideclares.h
  12. 31
      includes/iguana_apideclares2.h

1
basilisk/basilisk.c

@ -953,6 +953,7 @@ void basilisks_init(struct supernet_info *myinfo)
#include "../includes/iguana_apidefs.h"
#include "../includes/iguana_apideclares.h"
#include "../includes/iguana_apideclares2.h"
TWO_STRINGS(tradebot,gensvm,base,rel)
{

1
iguana/iguana_exchanges.c

@ -1176,6 +1176,7 @@ cJSON *iguana_pricesarray(struct supernet_info *myinfo,char *exchange,char *base
#include "../includes/iguana_apidefs.h"
#include "../includes/iguana_apideclares.h"
#include "../includes/iguana_apideclares2.h"
THREE_STRINGS_AND_THREE_INTS(InstantDEX,orderbook,exchange,base,rel,depth,allfields,ignore)
{

28
iguana/iguana_json.c

@ -498,6 +498,14 @@ char *SuperNET_htmlstr(char *fname,char *htmlstr,int32_t maxsize,char *agentstr)
return(OS_filestr(&filesize,"index7778.html"));
}
#ifdef WIN32
/**
* workaround for MSVS compiler bug -
* instead of going on if-else-if block split the if-else-if into two function
*/
char *SuperNET_parser2(struct supernet_info *myinfo, char *agentstr, char *method, cJSON *json, char *remoteaddr);
#endif
char *SuperNET_parser(struct supernet_info *myinfo,char *agentstr,char *method,cJSON *json,char *remoteaddr)
{
char *coinstr; struct iguana_info *coin = 0;
@ -614,13 +622,31 @@ char *SuperNET_parser(struct supernet_info *myinfo,char *agentstr,char *method,c
#define STRING_ARRAY_OBJ_STRING IGUANA_DISPATCH_SAOS
#include "../includes/iguana_apideclares.h"
#ifdef WIN32
return SuperNET_parser2(myinfo, agentstr, method, json, remoteaddr);
#else
#undef IGUANA_ARGS
#undef _IGUANA_APIDEC_H_
#include "../includes/iguana_apiundefs.h"
char errstr[512];
sprintf(errstr,"{\"error\":\"unsupported call\",\"agent\":\"%s\",\"method\":\"%s\"}",agentstr,method);
return(clonestr(errstr));
#endif
}
#ifdef WIN32
char *SuperNET_parser2(struct supernet_info *myinfo, char *agentstr, char *method, cJSON *json, char *remoteaddr) {
char *coinstr; struct iguana_info *coin = 0;
if (remoteaddr != 0 && (remoteaddr[0] == 0 || strcmp(remoteaddr, "127.0.0.1") == 0))
remoteaddr = 0;
#include "../includes/iguana_apideclares2.h"
#undef IGUANA_ARGS
#undef _IGUANA_APIDEC_H_
#include "../includes/iguana_apiundefs.h"
char errstr[512];
sprintf(errstr, "{\"error\":\"unsupported call\",\"agent\":\"%s\",\"method\":\"%s\"}", agentstr, method);
return(clonestr(errstr));
}
#endif

1
iguana/iguana_notary.c

@ -224,6 +224,7 @@ void dpow_addresses()
#include "../includes/iguana_apidefs.h"
#include "../includes/iguana_apideclares.h"
#include "../includes/iguana_apideclares2.h"
TWO_STRINGS(iguana,dpow,symbol,pubkey)
{

1
iguana/iguana_payments.c

@ -700,6 +700,7 @@ char *sendtoaddress(struct supernet_info *myinfo,struct iguana_info *coin,char *
#include "../includes/iguana_apidefs.h"
#include "../includes/iguana_apideclares.h"
#include "../includes/iguana_apideclares2.h"
STRING_AND_INT(bitcoinrpc,sendrawtransaction,rawtx,allowhighfees)
{

1
iguana/iguana_tradebots.c

@ -221,6 +221,7 @@ char *tradebot_control(struct supernet_info *myinfo,char *exchangestr,char *boti
#include "../includes/iguana_apidefs.h"
#include "../includes/iguana_apideclares.h"
#include "../includes/iguana_apideclares2.h"
HASH_ARRAY_STRING(tradebot,liquidity,hash,vals,targetcoin)
{

1
iguana/iguana_unspents.c

@ -1799,6 +1799,7 @@ void iguana_utxoaddrs_purge(struct iguana_info *coin)
#include "../includes/iguana_apidefs.h"
#include "../includes/iguana_apideclares.h"
#include "../includes/iguana_apideclares2.h"
STRING_AND_INT(iguana,snapshot,symbol,height)
{

1
iguana/iguana_wallet.c

@ -995,6 +995,7 @@ cJSON *iguana_privkeysjson(struct supernet_info *myinfo,struct iguana_info *coin
#include "../includes/iguana_apidefs.h"
#include "../includes/iguana_apideclares.h"
#include "../includes/iguana_apideclares2.h"
int64_t iguana_addressreceived(struct supernet_info *myinfo,struct iguana_info *coin,cJSON *json,char *remoteaddr,cJSON *txids,cJSON *vouts,cJSON *unspents,cJSON *spends,char *coinaddr,int32_t minconf,int32_t firstheight)
{

1
iguana/main.c

@ -1026,6 +1026,7 @@ void SuperNET_parsepeers(struct supernet_info *myinfo,cJSON *array,int32_t n,int
#include "../includes/iguana_apidefs.h"
#include "../includes/iguana_apideclares.h"
#include "../includes/iguana_apideclares2.h"
STRING_ARG(iguana,initfastfind,activecoin)
{

1
iguana/ramchain_api.c

@ -18,6 +18,7 @@
#include "../includes/iguana_apidefs.h"
#include "../includes/iguana_apideclares.h"
#include "../includes/iguana_apideclares2.h"
STRING_ARG(iguana,peers,activecoin)

4
includes/iguana_apideclares.h

@ -335,6 +335,8 @@ STRING_ARG(hash,base64_decode,message);
STRING_ARG(hash,rmd160_sha256,message);
STRING_ARG(hash,sha256_sha256,message);
#ifndef WIN32
STRING_ARG(hash,sha224,message);
STRING_ARG(hash,sha256,message);
STRING_ARG(hash,sha384,message);
@ -366,3 +368,5 @@ TWO_STRINGS(hmac,tiger192_3,message,passphrase);
TWO_STRINGS(hmac,whirlpool,message,passphrase);
#endif
#endif

31
includes/iguana_apideclares2.h

@ -0,0 +1,31 @@
#ifdef WIN32
STRING_ARG(hash, sha224, message);
STRING_ARG(hash, sha256, message);
STRING_ARG(hash, sha384, message);
STRING_ARG(hash, sha512, message);
STRING_ARG(hash, rmd128, message);
STRING_ARG(hash, rmd160, message);
STRING_ARG(hash, rmd256, message);
STRING_ARG(hash, rmd320, message);
STRING_ARG(hash, sha1, message);
STRING_ARG(hash, md2, message);
STRING_ARG(hash, md4, message);
STRING_ARG(hash, md5, message);
STRING_ARG(hash, tiger192_3, message);
STRING_ARG(hash, whirlpool, message);
TWO_STRINGS(hmac, sha224, message, passphrase);
TWO_STRINGS(hmac, sha256, message, passphrase);
TWO_STRINGS(hmac, sha384, message, passphrase);
TWO_STRINGS(hmac, sha512, message, passphrase);
TWO_STRINGS(hmac, rmd128, message, passphrase);
TWO_STRINGS(hmac, rmd160, message, passphrase);
TWO_STRINGS(hmac, rmd256, message, passphrase);
TWO_STRINGS(hmac, rmd320, message, passphrase);
TWO_STRINGS(hmac, sha1, message, passphrase);
TWO_STRINGS(hmac, md2, message, passphrase);
TWO_STRINGS(hmac, md4, message, passphrase);
TWO_STRINGS(hmac, md5, message, passphrase);
TWO_STRINGS(hmac, tiger192_3, message, passphrase);
TWO_STRINGS(hmac, whirlpool, message, passphrase);
#endif
Loading…
Cancel
Save