Browse Source

Merge pull request #887 from jl777/jl777

#define LP_MAXPRICEINFOS 512
pass-iguana-arg
jl777 7 years ago
committed by GitHub
parent
commit
8a48c3ec3e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      iguana/exchanges/LP_include.h
  2. 3
      iguana/exchanges/LP_socket.c
  3. 2
      iguana/exchanges/coins
  4. 9
      iguana/iguana_wallet.c

2
iguana/exchanges/LP_include.h

@ -428,7 +428,7 @@ struct LP_swapstats
struct LP_pubswap { struct LP_pubswap *next,*prev; struct LP_swapstats *swap; }; struct LP_pubswap { struct LP_pubswap *next,*prev; struct LP_swapstats *swap; };
#define LP_MAXPRICEINFOS 256 #define LP_MAXPRICEINFOS 512
struct LP_pubkey_info struct LP_pubkey_info
{ {
UT_hash_handle hh; UT_hash_handle hh;

3
iguana/exchanges/LP_socket.c

@ -25,6 +25,9 @@
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <WinSock2.h> #include <WinSock2.h>
#endif #endif
#ifdef _WIN32
#include <WinSock2.h>
#endif
int32_t set_blocking_mode(int32_t sock,int32_t is_blocking) // from https://stackoverflow.com/questions/2149798/how-to-reset-a-socket-back-to-blocking-mode-after-i-set-it-to-nonblocking-mode?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa int32_t set_blocking_mode(int32_t sock,int32_t is_blocking) // from https://stackoverflow.com/questions/2149798/how-to-reset-a-socket-back-to-blocking-mode-after-i-set-it-to-nonblocking-mode?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
{ {

2
iguana/exchanges/coins

File diff suppressed because one or more lines are too long

9
iguana/iguana_wallet.c

@ -1402,7 +1402,7 @@ TWOSTRINGS_AND_INT(bitcoinrpc,walletpassphrase,password,permanentfile,timeout)
THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile) THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile)
{ {
char *retstr,buf[128],wifstr[128]; cJSON *retjson; int32_t need_KMD = 0,need_BTC = 0,need_GAME = 0; char *retstr,buf[128],wifstr[128]; cJSON *retjson; int32_t need_HUSH = 0,need_KMD = 0,need_BTC = 0,need_GAME = 0;
if ( remoteaddr != 0 || coin == 0 ) if ( remoteaddr != 0 || coin == 0 )
return(clonestr("{\"error\":\"no remote encrypt or no coin\"}")); return(clonestr("{\"error\":\"no remote encrypt or no coin\"}"));
iguana_walletlock(myinfo,coin); iguana_walletlock(myinfo,coin);
@ -1441,11 +1441,18 @@ THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile)
need_BTC = 1; need_BTC = 1;
if ( strcmp(coin->symbol,"GAME") != 0 ) if ( strcmp(coin->symbol,"GAME") != 0 )
need_GAME = 1; need_GAME = 1;
if ( strcmp(coin->symbol,"HUSH") != 0 )
need_HUSH = 1;
if ( need_KMD != 0 && (coin= iguana_coinfind("KMD")) != 0 ) if ( need_KMD != 0 && (coin= iguana_coinfind("KMD")) != 0 )
{ {
bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype); bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype);
jaddstr(retjson,"KMDwif",wifstr); jaddstr(retjson,"KMDwif",wifstr);
} }
if ( need_HUSH != 0 && (coin= iguana_coinfind("HUSH")) != 0 )
{
bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype);
jaddstr(retjson,"HUSHwif",wifstr);
}
if ( (coin= iguana_coinfind("LTC")) != 0 ) if ( (coin= iguana_coinfind("LTC")) != 0 )
{ {
bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype); bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype);

Loading…
Cancel
Save