From 50aedf190a300663cf37ecf81ad73cff8477c499 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 30 Oct 2017 14:10:42 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_commands.c | 5 +++-- iguana/exchanges/LP_signatures.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index ade9ae58c..e64569763 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -503,11 +503,12 @@ stop()\n\ return(jprint(LP_coinsjson(0),1)); else if ( strcmp(method,"wantnotify") == 0 ) { - bits256 pub; + bits256 pub; static uint32_t lastnotify; pub = jbits256(argjson,"pub"); //char str[65]; printf("got wantnotify.(%s) vs %s\n",jprint(argjson,0),bits256_str(str,G.LP_mypub25519)); - if ( bits256_cmp(pub,G.LP_mypub25519) == 0 ) + if ( bits256_cmp(pub,G.LP_mypub25519) == 0 && time(NULL) > lastnotify+30 ) { + lastnotify = (uint32_t)time(NULL); printf("wantnotify for me!\n"); LP_notify_pubkeys(ctx,LP_mypubsock); } diff --git a/iguana/exchanges/LP_signatures.c b/iguana/exchanges/LP_signatures.c index 18b74acad..35ade4e60 100644 --- a/iguana/exchanges/LP_signatures.c +++ b/iguana/exchanges/LP_signatures.c @@ -587,7 +587,7 @@ void LP_smartutxos_push(struct iguana_info *coin) struct LP_peerinfo *peer,*tmp; uint64_t value; bits256 zero,txid; int32_t i,vout,height,n; char *retstr; cJSON *array,*item,*req; if ( coin->smartaddr[0] == 0 ) return; - LP_notify_pubkeys(coin->ctx,LP_mypubsock); + //LP_notify_pubkeys(coin->ctx,LP_mypubsock); if ( (array= LP_address_utxos(coin,coin->smartaddr,1)) != 0 ) { memset(zero.bytes,0,sizeof(zero));