Browse Source

Test

etomic
jl777 7 years ago
parent
commit
674be38211
  1. 2
      iguana/dpow/dpow_network.c
  2. 5
      iguana/exchanges/LP_commands.c
  3. 10
      iguana/exchanges/LP_nativeDEX.c
  4. 2
      iguana/main.c

2
iguana/dpow/dpow_network.c

@ -584,6 +584,8 @@ char *dex_response(int32_t *broadcastflagp,struct supernet_info *myinfo,struct d
{ {
char buf[65],*retstr = 0; int32_t i,datalen; bits256 hash2; cJSON *retjson=0; struct iguana_info *coin; struct dex_request dexreq; char buf[65],*retstr = 0; int32_t i,datalen; bits256 hash2; cJSON *retjson=0; struct iguana_info *coin; struct dex_request dexreq;
*broadcastflagp = 0; *broadcastflagp = 0;
return(clonestr("{\"error\":\"basilisk disabled\"}"));
if ( strcmp(dexp->handler,"request") == 0 ) if ( strcmp(dexp->handler,"request") == 0 )
{ {
datalen = dex_rwrequest(0,dexp->packet,&dexreq); datalen = dex_rwrequest(0,dexp->packet,&dexreq);

5
iguana/exchanges/LP_commands.c

@ -442,16 +442,11 @@ zeroconf_claim(address, expiration=0)\n\
if ( coinaddr[0] != 0 ) if ( coinaddr[0] != 0 )
{ {
LP_address(ptr,coinaddr); LP_address(ptr,coinaddr);
//LP_listunspent_issue(coin,coinaddr,2);
if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_privkey) != 0 ) if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_privkey) != 0 )
{ {
LP_privkey_init(-1,ptr,G.LP_privkey,G.LP_mypub25519); LP_privkey_init(-1,ptr,G.LP_privkey,G.LP_mypub25519);
//LP_smartutxos_push(ptr);
} }
return(jprint(LP_listunspent(coin,coinaddr),0)); return(jprint(LP_listunspent(coin,coinaddr),0));
//if ( ptr->electrum != 0 )
//return(LP_unspents_filestr(coin,coinaddr));
//else return(jprint(LP_address_utxos(ptr,coinaddr,1),1));
} }
} }
return(clonestr("{\"error\":\"no address specified\"}")); return(clonestr("{\"error\":\"no address specified\"}"));

10
iguana/exchanges/LP_nativeDEX.c

@ -18,23 +18,15 @@
// marketmaker // marketmaker
// //
// feature requests: // feature requests:
// electrum memleak?
// alice waiting for bestprice // alice waiting for bestprice
// USD paxprice based USDvalue in portfolio // USD paxprice based USDvalue in portfolio
// cancel bid/ask // cancel bid/ask
// https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki for signing BCH/BTG // https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki for signing BCH/BTG
// //
// bugs, validations: // bugs, validations:
/*Buyer Payment 08ccac7534dc6aad0139b7dd6a78344d309fbc6bff27f2fba7c8f178f5d309a0
Seller Payment f876412f3dc637998b099b05ae0fe3e769e5adafcb49ef156be9f7749f2e3071
Quote ID 2681103143
Request ID 301413467
Trade id 3567859514*/
// waiting for alice and alice disconnects, can find bobpayment based on Q.txid // waiting for alice and alice disconnects, can find bobpayment based on Q.txid
// MNZ getcoin strangeness
// portfolio value based on ask? // portfolio value based on ask?
// listunspent triplicate, tradebot timeslice? the tradebot timeslice is just getting too much timeslices
// disable basilisk // disable basilisk
// verify encrypted destpubkey, broadcast:0 setprice // verify encrypted destpubkey, broadcast:0 setprice

2
iguana/main.c

@ -793,7 +793,7 @@ void iguana_launchdaemons(struct supernet_info *myinfo)
if ( COMMANDLINE_ARGFILE == 0 ) if ( COMMANDLINE_ARGFILE == 0 )
iguana_launch(0,"rpcloop",iguana_rpcloop,myinfo,IGUANA_PERMTHREAD); // limit to oneprocess iguana_launch(0,"rpcloop",iguana_rpcloop,myinfo,IGUANA_PERMTHREAD); // limit to oneprocess
printf("launch mainloop\n"); printf("launch mainloop\n");
OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)DEX_explorerloop,(void *)myinfo); // disable basilisk: OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)DEX_explorerloop,(void *)myinfo);
OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)jumblr_loop,(void *)myinfo); OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)jumblr_loop,(void *)myinfo);
OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)dpow_psockloop,(void *)myinfo); OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)dpow_psockloop,(void *)myinfo);
mainloop(myinfo); mainloop(myinfo);

Loading…
Cancel
Save