Skip to content

Commit

Permalink
Merge pull request jl777#424 from jl777/spvdex
Browse files Browse the repository at this point in the history
Spvdex
  • Loading branch information
jl777 authored Nov 2, 2017
2 parents 9ff4358 + 5849f83 commit d6922d7
Show file tree
Hide file tree
Showing 12 changed files with 145 additions and 69 deletions.
10 changes: 7 additions & 3 deletions crypto777/iguana_OS.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,15 @@ void *OS_loadfile(char *fname,char **bufp,long *lenp,long *allocsizep)
return(buf);
}

void *OS_filestr(long *allocsizep,char *fname)
void *OS_filestr(long *allocsizep,char *_fname)
{
long filesize = 0; char *buf = 0;
long filesize = 0; char *fname,*buf = 0; void *retptr;
*allocsizep = 0;
return(OS_loadfile(fname,&buf,&filesize,allocsizep));
fname = malloc(strlen(_fname)+1);
strcpy(fname,_fname);
retptr = OS_loadfile(fname,&buf,&filesize,allocsizep);
free(fname);
return(retptr);
}

// following functions cant be fully implemented in one or more OS
Expand Down
2 changes: 1 addition & 1 deletion iguana/exchanges/LP_RTmetrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void LP_RTmetrics_update(char *base,char *rel)
char str[65]; printf("%s has %d pending swaps! which is more than %d\n",bits256_str(str,LP_RTmetrics.pending_pubkeys[i]),LP_RTmetrics.pending_swaps[i],LP_MAXPENDING_SWAPS);
LP_RTmetrics_blacklistadd(LP_RTmetrics.pending_pubkeys[i]);
}
printf("%d pubkeys have pending swaps, whitelist.%d blacklist.%d avoidtxids.%d\n",LP_RTmetrics.numpendings,LP_RTmetrics.numwhitelist,LP_RTmetrics.numblacklist,LP_RTmetrics.numavoidtxids);
//printf("%d pubkeys have pending swaps, whitelist.%d blacklist.%d avoidtxids.%d\n",LP_RTmetrics.numpendings,LP_RTmetrics.numwhitelist,LP_RTmetrics.numblacklist,LP_RTmetrics.numavoidtxids);
}

double _LP_RTmetric_calc(struct LP_metricinfo *mp,double bestprice,double maxprice,double relvolume)
Expand Down
4 changes: 2 additions & 2 deletions iguana/exchanges/LP_include.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void emscripten_usleep(int32_t x); // returns immediate, no sense for sleeping
#define LP_MAGICBITS 8

#define LP_HTTP_TIMEOUT 3 // 1 is too small due to edge cases of time(NULL)
#define LP_AUTOTRADE_TIMEOUT 15
#define LP_AUTOTRADE_TIMEOUT 20
#define ELECTRUM_TIMEOUT 10
#define LP_ELECTRUM_KEEPALIVE 60
#define LP_ELECTRUM_MAXERRORS 777
Expand Down Expand Up @@ -387,7 +387,7 @@ int32_t LP_coinbus(uint16_t coin_busport);
int32_t LP_nanomsg_recvs(void *ctx);
uint64_t LP_RTsmartbalance(struct iguana_info *coin);
int32_t LP_getheight(struct iguana_info *coin);
int32_t LP_reserved_msg(char *base,char *rel,bits256 pubkey,char *msg);
int32_t LP_reserved_msg(int32_t priority,char *base,char *rel,bits256 pubkey,char *msg);
struct iguana_info *LP_coinfind(char *symbol);
int32_t LP_crc32find(int32_t *duplicatep,int32_t ind,uint32_t crc32);
char *LP_pricepings(void *ctx,char *myipaddr,int32_t pubsock,char *base,char *rel,double price);
Expand Down
71 changes: 46 additions & 25 deletions iguana/exchanges/LP_nativeDEX.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include "LP_include.h"
portable_mutex_t LP_peermutex,LP_UTXOmutex,LP_utxomutex,LP_commandmutex,LP_cachemutex,LP_swaplistmutex,LP_forwardmutex,LP_pubkeymutex,LP_networkmutex,LP_psockmutex,LP_coinmutex,LP_messagemutex,LP_portfoliomutex,LP_electrummutex,LP_butxomutex,LP_reservedmutex,LP_nanorecvsmutex,LP_tradebotsmutex;
int32_t LP_canbind;
char *Broadcaststr,*Reserved_msgs[1000];
int32_t num_Reserved_msgs,max_Reserved_msgs;
char *Broadcaststr,*Reserved_msgs[2][1000];
int32_t num_Reserved_msgs[2],max_Reserved_msgs[2];
struct LP_peerinfo *LP_peerinfos,*LP_mypeer;
struct LP_forwardinfo *LP_forwardinfos;
struct iguana_info *LP_coins;
Expand Down Expand Up @@ -237,7 +237,7 @@ char *LP_process_message(void *ctx,char *typestr,char *myipaddr,int32_t pubsock,
memset(zero.bytes,0,sizeof(zero));
/*if ( (method= jstr(reqjson,"method")) != 0 && (strcmp(method,"request") == 0 || strcmp(method,"requested") == 0 || strcmp(method,"connect") == 0 || strcmp(method,"connected") == 0) )
printf("broadcast.(%s)\n",Broadcaststr);*/
LP_reserved_msg("","",zero,jprint(reqjson,0));
LP_reserved_msg(0,"","",zero,jprint(reqjson,0));
}
retstr = clonestr("{\"result\":\"success\"}");
free_json(reqjson);
Expand Down Expand Up @@ -514,6 +514,8 @@ void LP_coinsloop(void *_coins)
memset(&zero,0,sizeof(zero));
if ( coin->inactive != 0 )
continue;
if ( coin->longestchain == 1 ) // special init value
coin->longestchain = LP_getheight(coin);
if ( (ep= coin->electrum) != 0 )
{
if ( (backupep= ep->prev) == 0 )
Expand Down Expand Up @@ -583,7 +585,7 @@ void LP_coinsloop(void *_coins)
continue;
}
nonz++;
//if ( (coin->lastscanht % 1000) == 0 )
if ( coin->lastscanht < coin->longestchain-3 )
printf("[%s]: %s ref.%d scan.%d to %d, longest.%d\n",coins,coin->symbol,coin->firstrefht,coin->firstscanht,coin->lastscanht,coin->longestchain);
for (j=0; j<100; j++)
{
Expand Down Expand Up @@ -690,9 +692,12 @@ void LP_initcoins(void *ctx,int32_t pubsock,cJSON *coins)
printf("%s ",activecoins[i]);
LP_coinfind(activecoins[i]);
LP_priceinfoadd(activecoins[i]);
if ( (coin= LP_coinfind(activecoins[i])) != 0 && LP_getheight(coin) <= 0 )
coin->inactive = (uint32_t)time(NULL);
LP_unspents_load(coin->symbol,coin->smartaddr);
if ( (coin= LP_coinfind(activecoins[i])) != 0 )
{
if ( LP_getheight(coin) <= 0 )
coin->inactive = (uint32_t)time(NULL);
LP_unspents_load(coin->symbol,coin->smartaddr);
}
}
if ( (n= cJSON_GetArraySize(coins)) > 0 )
{
Expand All @@ -704,9 +709,12 @@ void LP_initcoins(void *ctx,int32_t pubsock,cJSON *coins)
printf("%s ",jstr(item,"coin"));
LP_coincreate(item);
LP_priceinfoadd(jstr(item,"coin"));
if ( (coin= LP_coinfind(symbol)) != 0 && LP_getheight(coin) <= 0 )
coin->inactive = (uint32_t)time(NULL);
LP_unspents_load(coin->symbol,coin->smartaddr);
if ( (coin= LP_coinfind(symbol)) != 0 )
{
if ( LP_getheight(coin) <= 0 )
coin->inactive = (uint32_t)time(NULL);
LP_unspents_load(coin->symbol,coin->smartaddr);
}
}
}
}
Expand Down Expand Up @@ -755,13 +763,17 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint

void LP_pubkeysloop(void *ctx)
{
static uint32_t lasttime;
sleep(10);
while ( 1 )
{
LP_counter += 100;
//printf("LP_pubkeysloop %d\n",LP_counter);
LP_notify_pubkeys(ctx,LP_mypubsock);
sleep(LP_ORDERBOOK_DURATION * .777);
if ( time(NULL) > lasttime+60 )
{
//printf("LP_pubkeysloop %u\n",(uint32_t)time(NULL));
LP_notify_pubkeys(ctx,LP_mypubsock);
lasttime = (uint32_t)time(NULL);
}
sleep(3);
}
}

Expand Down Expand Up @@ -797,7 +809,7 @@ void LP_reserved_msgs(void *ignore)
memset(zero.bytes,0,sizeof(zero));
while ( 1 )
{
if ( num_Reserved_msgs > 0 )
if ( num_Reserved_msgs[0] > 0 || num_Reserved_msgs[1] > 0 )
{
flag = 0;
if ( LP_mypubsock >= 0 )
Expand All @@ -811,9 +823,18 @@ void LP_reserved_msgs(void *ignore)
if ( flag == 1 )
{
portable_mutex_lock(&LP_reservedmutex);
num_Reserved_msgs--;
LP_broadcast_message(LP_mypubsock,"","",zero,Reserved_msgs[num_Reserved_msgs]);
Reserved_msgs[num_Reserved_msgs] = 0;
if ( num_Reserved_msgs[1] > 0 )
{
num_Reserved_msgs[1]--;
LP_broadcast_message(LP_mypubsock,"","",zero,Reserved_msgs[1][num_Reserved_msgs[1]]);
Reserved_msgs[1][num_Reserved_msgs[1]] = 0;
}
else if ( num_Reserved_msgs[0] > 0 )
{
num_Reserved_msgs[0]--;
LP_broadcast_message(LP_mypubsock,"","",zero,Reserved_msgs[0][num_Reserved_msgs[0]]);
Reserved_msgs[0][num_Reserved_msgs[0]] = 0;
}
portable_mutex_unlock(&LP_reservedmutex);
}
}
Expand All @@ -823,20 +844,20 @@ void LP_reserved_msgs(void *ignore)
}
}

int32_t LP_reserved_msg(char *base,char *rel,bits256 pubkey,char *msg)
int32_t LP_reserved_msg(int32_t priority,char *base,char *rel,bits256 pubkey,char *msg)
{
int32_t n = 0;
portable_mutex_lock(&LP_reservedmutex);
if ( num_Reserved_msgs < sizeof(Reserved_msgs)/sizeof(*Reserved_msgs) )
if ( num_Reserved_msgs[priority] < sizeof(Reserved_msgs[priority])/sizeof(*Reserved_msgs[priority]) )
{
Reserved_msgs[num_Reserved_msgs++] = msg;
n = num_Reserved_msgs;
Reserved_msgs[priority][num_Reserved_msgs[priority]++] = msg;
n = num_Reserved_msgs[priority];
} else LP_broadcast_message(LP_mypubsock,base,rel,pubkey,msg);
portable_mutex_unlock(&LP_reservedmutex);
if ( num_Reserved_msgs > max_Reserved_msgs )
if ( num_Reserved_msgs[priority] > max_Reserved_msgs[priority] )
{
max_Reserved_msgs = num_Reserved_msgs;
printf("New max_Reserved_msgs.%d\n",max_Reserved_msgs);
max_Reserved_msgs[priority] = num_Reserved_msgs[priority];
printf("New priority.%d max_Reserved_msgs.%d\n",priority,max_Reserved_msgs[priority]);
}
return(n);
}
Expand Down
39 changes: 25 additions & 14 deletions iguana/exchanges/LP_ordermatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ struct LP_utxoinfo *LP_address_utxopair(int32_t iambob,struct LP_address_utxo **
if ( (double)up->U.value/targetval < LP_MINVOL-1 )

{
if ( (mini= LP_nearest_utxovalue(coin,coinaddr,utxos,m,targetval2 * 1.01)) >= 0 )
if ( (mini= LP_nearest_utxovalue(coin,coinaddr,utxos,m,(targetval2+2*txfee) * 1.01)) >= 0 )
{
if ( up != 0 && (up2= utxos[mini]) != 0 )
{
Expand All @@ -304,7 +304,7 @@ struct LP_utxoinfo *LP_address_utxopair(int32_t iambob,struct LP_address_utxo **
}
}
} //else printf("cant find targetval2 %.8f\n",dstr(targetval2));
} else printf("failed ratio test %.8f\n",(double)up->U.value/targetval);
} //else printf("failed ratio test %.8f\n",(double)up->U.value/targetval);
} else if ( targetval != 0 && mini >= 0 )
printf("targetval %.8f mini.%d\n",dstr(targetval),mini);
} //else printf("no %s utxos pass LP_address_utxo_ptrs filter\n",coinaddr);
Expand Down Expand Up @@ -375,8 +375,12 @@ int32_t LP_connectstartbob(void *ctx,int32_t pubsock,struct LP_utxoinfo *utxo,cJ
//jaddnum(retjson,"quoteid",qp->R.quoteid);
// LP_addsig
char str[65]; printf("BOB pubsock.%d binds to %d (%s)\n",pubsock,pair,bits256_str(str,utxo->S.otherpubkey));
LP_reserved_msg(base,rel,utxo->S.otherpubkey,jprint(retjson,0));
LP_broadcast_message(LP_mypubsock,qp->srccoin,qp->destcoin,qp->desthash,jprint(retjson,0));
LP_reserved_msg(1,base,rel,utxo->S.otherpubkey,jprint(retjson,0));
sleep(1);
bits256 zero;
memset(zero.bytes,0,sizeof(zero));
LP_reserved_msg(1,base,rel,zero,jprint(retjson,0));
//LP_broadcast_message(LP_mypubsock,qp->srccoin,qp->destcoin,qp->desthash,jprint(retjson,0));
free_json(retjson);
retval = 0;
} else printf("error launching swaploop\n");
Expand Down Expand Up @@ -734,8 +738,12 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
printf("return after queued RESERVED: set swappending.%u accept qprice %.8f, min %.8f\n(%s)\n",butxo->T.swappending,qprice,price,msg);
// LP_addsig
//msg2 = clonestr(msg);
LP_reserved_msg(Q.srccoin,Q.destcoin,butxo->S.otherpubkey,msg);
LP_broadcast_message(LP_mypubsock,Q.srccoin,Q.destcoin,Q.desthash,jprint(retjson,0));
LP_reserved_msg(1,Q.srccoin,Q.destcoin,butxo->S.otherpubkey,clonestr(msg));
sleep(1);
bits256 zero;
memset(zero.bytes,0,sizeof(zero));
LP_reserved_msg(1,Q.srccoin,Q.destcoin,zero,msg);
//LP_broadcast_message(LP_mypubsock,Q.srccoin,Q.destcoin,Q.desthash,jprint(retjson,0));
free_json(retjson);
return(retval);
} else printf("warning swappending.%u swap.%p\n",butxo->T.swappending,butxo->S.swap);
Expand Down Expand Up @@ -803,7 +811,9 @@ struct LP_utxoinfo *LP_buyutxo(double *ordermatchpricep,int64_t *bestsatoshisp,i
{
item = jitem(asks,i);
price = jdouble(item,"price");
price *= 1.005;
if ( price/maxprice < .9 )
price *= 1.025;
else price *= 1.001;
pubkey = jbits256(item,"pubkey");
if ( bits256_nonz(destpubkey) != 0 && bits256_cmp(destpubkey,pubkey) != 0 )
continue;
Expand All @@ -824,8 +834,8 @@ struct LP_utxoinfo *LP_buyutxo(double *ordermatchpricep,int64_t *bestsatoshisp,i
{
bitcoin_address(coinaddr,basecoin->taddr,basecoin->pubtype,pubp->rmd160,sizeof(pubp->rmd160));
asatoshis = autxo->S.satoshis;
LP_listunspent_query(base,coinaddr);
LP_listunspent_both(base,coinaddr,1);
LP_listunspent_query(base,coinaddr);
//LP_listunspent_both(base,coinaddr,1);
for (j=0; j<maxiters; j++)
{
if ( (bestutxo= LP_ordermatch_iter(utxos,max,ordermatchpricep,bestsatoshisp,bestdestsatoshisp,basecoin,coinaddr,asatoshis,price,txfee,desttxfee,pubp->pubkey,gui)) != 0 )
Expand Down Expand Up @@ -885,13 +895,13 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel
timeout = LP_AUTOTRADE_TIMEOUT;
if ( basecoin->electrum != 0 && relcoin->electrum != 0 )
{
if ( timeout < 3*LP_AUTOTRADE_TIMEOUT )
timeout = 3*LP_AUTOTRADE_TIMEOUT;
if ( timeout < 2*LP_AUTOTRADE_TIMEOUT )
timeout = 2*LP_AUTOTRADE_TIMEOUT;
}
else if ( basecoin->electrum != 0 || relcoin->electrum != 0 )
{
if ( timeout < 2*LP_AUTOTRADE_TIMEOUT )
timeout = 2*LP_AUTOTRADE_TIMEOUT;
if ( timeout < 1.5*LP_AUTOTRADE_TIMEOUT )
timeout = 1.5*LP_AUTOTRADE_TIMEOUT;
}
if ( time(NULL) < Alice_expiration )
return(clonestr("{\"error\":\"only one pending request at a time\"}"));
Expand All @@ -915,7 +925,7 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel
{
destsatoshis -= 2*desttxfee;
autxo->S.satoshis = destsatoshis;
printf("first path dest %.8f from %.8f\n",dstr(destsatoshis),dstr(autxo->S.satoshis));
//printf("first path dest %.8f from %.8f\n",dstr(destsatoshis),dstr(autxo->S.satoshis));
}
else if ( autxo->S.satoshis - 2*desttxfee < destsatoshis )
{
Expand Down Expand Up @@ -965,6 +975,7 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel
continue;
else return(clonestr("{\"error\":\"cant ordermatch to destpubkey\"}"));
}
printf("i.%d maxiters.%d qprice %.8f vs maxprice %.8f\n",i,maxiters,dstr(qprice),dstr(maxprice));
return(LP_trade(ctx,myipaddr,mypubsock,&Q,maxprice,timeout,duration,tradeid));
}
return(clonestr("{\"error\":\"cant get here\"}"));
Expand Down
2 changes: 1 addition & 1 deletion iguana/exchanges/LP_peers.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ struct LP_peerinfo *LP_addpeer(struct LP_peerinfo *mypeer,int32_t mypubsock,char
struct iguana_info *coin,*ctmp; bits256 zero; char busaddr[64];
memset(zero.bytes,0,sizeof(zero));
//LP_send(mypubsock,msg,(int32_t)strlen(msg)+1,1);
LP_reserved_msg("","",zero,jprint(LP_peerjson(peer),1));
LP_reserved_msg(0,"","",zero,jprint(LP_peerjson(peer),1));
if ( 0 )
{
HASH_ITER(hh,LP_coins,coin,ctmp)
Expand Down
2 changes: 1 addition & 1 deletion iguana/exchanges/LP_prices.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ void LP_pubkeys_query()
jaddstr(reqjson,"method","wantnotify");
jaddbits256(reqjson,"pub",pubp->pubkey);
//printf("LP_pubkeys_query %s\n",jprint(reqjson,0));
LP_reserved_msg("","",zero,jprint(reqjson,1));
LP_reserved_msg(0,"","",zero,jprint(reqjson,1));
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions iguana/exchanges/LP_remember.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,10 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti
itemstr = jprint(item,0);
fprintf(fp,"%s\n",itemstr);
LP_tradecommand_log(item);
LP_reserved_msg(rswap.src,rswap.dest,zero,clonestr(itemstr));
LP_broadcast_message(LP_mypubsock,rswap.src,rswap.dest,zero,itemstr);
LP_reserved_msg(1,rswap.src,rswap.dest,zero,clonestr(itemstr));
sleep(1);
LP_reserved_msg(0,rswap.src,rswap.dest,zero,itemstr);
//LP_broadcast_message(LP_mypubsock,rswap.src,rswap.dest,zero,itemstr);
fclose(fp);
}
}
Expand Down
14 changes: 7 additions & 7 deletions iguana/exchanges/LP_signatures.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ void LP_postutxos(char *symbol,char *coinaddr)
//char str[65]; printf("utxoshash add %s\n",bits256_str(str,utxoshash));
LP_utxos_sigadd(reqjson,timestamp,G.LP_privkey,G.LP_pubsecp,G.LP_mypub25519,utxoshash);
//printf("post (%s) -> %d\n",msg,LP_mypubsock);
LP_reserved_msg(symbol,symbol,zero,jprint(reqjson,1));
LP_reserved_msg(0,symbol,symbol,zero,jprint(reqjson,1));
}
}
}
Expand Down Expand Up @@ -463,7 +463,7 @@ char *LP_pricepings(void *ctx,char *myipaddr,int32_t pubsock,char *base,char *re
init_hexbytes_noT(pubsecpstr,G.LP_pubsecp,33);
jaddstr(reqjson,"pubsecp",pubsecpstr);
LP_price_sigadd(reqjson,timestamp,G.LP_privkey,G.LP_pubsecp,G.LP_mypub25519,base,rel,price64);
LP_reserved_msg(base,rel,zero,jprint(reqjson,1));
LP_reserved_msg(0,base,rel,zero,jprint(reqjson,1));
return(clonestr("{\"result\":\"success\"}"));
} else return(clonestr("{\"error\":\"electrum node cant post bob asks\"}"));
}
Expand Down Expand Up @@ -569,7 +569,7 @@ void LP_notify_pubkeys(void *ctx,int32_t pubsock)
timestamp = (uint32_t)time(NULL);
jaddnum(reqjson,"timestamp",timestamp);
LP_pubkey_sigadd(reqjson,timestamp,G.LP_privkey,G.LP_mypub25519,G.LP_myrmd160,G.LP_pubsecp);
LP_reserved_msg("","",zero,jprint(reqjson,1));
LP_reserved_msg(0,"","",zero,jprint(reqjson,1));
}

char *LP_notify_recv(cJSON *argjson)
Expand Down Expand Up @@ -624,7 +624,7 @@ void LP_smartutxos_push(struct iguana_info *coin)
jaddnum(req,"ht",height);
jadd64bits(req,"value",value);
//printf("ADDR_UNSPENTS[] <- %s\n",jprint(req,0));
LP_reserved_msg("","",zero,jprint(req,1));
LP_reserved_msg(0,"","",zero,jprint(req,1));
#endif
}
}
Expand Down Expand Up @@ -657,7 +657,7 @@ void LP_listunspent_query(char *symbol,char *coinaddr)
jaddstr(reqjson,"method","addr_unspents");
jaddstr(reqjson,"coin",symbol);
jaddstr(reqjson,"address",coinaddr);
LP_reserved_msg("","",zero,jprint(reqjson,1));
LP_reserved_msg(0,"","",zero,jprint(reqjson,1));
}

void LP_query(void *ctx,char *myipaddr,int32_t mypubsock,char *method,struct LP_quoteinfo *qp)
Expand All @@ -684,9 +684,9 @@ void LP_query(void *ctx,char *myipaddr,int32_t mypubsock,char *method,struct LP_
//printf("QUERY.(%s)\n",msg);
memset(&zero,0,sizeof(zero));
portable_mutex_lock(&LP_reservedmutex);
if ( num_Reserved_msgs < sizeof(Reserved_msgs)/sizeof(*Reserved_msgs)-2 )
if ( num_Reserved_msgs[1] < sizeof(Reserved_msgs[1])/sizeof(*Reserved_msgs[1])-2 )
{
Reserved_msgs[num_Reserved_msgs++] = msg;
Reserved_msgs[1][num_Reserved_msgs[1]++] = msg;
//Reserved_msgs[num_Reserved_msgs++] = msg2;
}
LP_broadcast_message(LP_mypubsock,qp->srccoin,qp->destcoin,zero,msg2);
Expand Down
Loading

0 comments on commit d6922d7

Please sign in to comment.