From 961c15f2470ba4bd45b7d4dfb6b66a73509cf632 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 14 Jun 2017 14:36:02 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_prices.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index 77376e4cd..47353a84b 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -96,7 +96,7 @@ struct LP_pubkeyinfo *LP_pubkeyadd(bits256 pubkey) portable_mutex_lock(&LP_pubkeymutex); pubp = calloc(1,sizeof(*pubp)); pubp->pubkey = pubkey; - HASH_ADD(hh,LP_pubkeyinfos,pubkey,sizeof(pubkey),pubp); + HASH_ADD_KEYPTR(hh,LP_pubkeyinfos,&pubp->pubkey,sizeof(pubp->pubkey),pubp); portable_mutex_unlock(&LP_pubkeymutex); if ( (pubp= LP_pubkeyfind(pubkey)) == 0 ) printf("pubkeyadd find error after add\n"); @@ -442,6 +442,7 @@ char *LP_orderbook(char *base,char *rel) printf("start cache.(%d %d) numbids.%d numasks.%d\n",cachenumbids,cachenumasks,numbids,numasks); HASH_ITER(hh,LP_pubkeyinfos,pubp,ptmp) { + char str[65]; printf("pubkey.(%s)\n",bits256_str(str,pubp->pubkey)); if ( pubp->matrix[baseid][relid] > SMALLVAL ) numasks = LP_orderbook_utxoentries(now,base,rel,base,pubp->matrix[baseid][relid],&asks,numasks,cachenumasks,pubp->pubkey); if ( pubp->matrix[relid][baseid] > SMALLVAL )