diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index d74b34501..1c4d76600 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -123,9 +123,9 @@ trust(pubkey, trust)*\n\ balance(coin, address)\n\ orderbook(base, rel, duration=3600)\n\ getprices(base, rel)\n\ -sendmessage(base=coin, rel="", pubkey=zero, )*\n\ -getmessages(firsti=0, num=100)*\n\ -deletemessages(firsti=0, num=100)*\n\ +sendmessage(base=coin, rel="", pubkey=zero, )\n\ +getmessages(firsti=0, num=100)\n\ +deletemessages(firsti=0, num=100)\n\ secretaddresses(prefix='secretaddress', passphrase, num=10, pubtype=60, taddr=0)\n\ electrum(coin, ipaddr, port)*\n\ snapshot(coin, height)\n\ @@ -155,21 +155,18 @@ dividends(coin, height, )\n\ { if ( jobj(argjson,"method2") == 0 ) { - //LP_signature_add(argjson,jstr(argjson,"message"),jbits256(argjson,"pubkey")); LP_broadcast_message(LP_mypubsock,base!=0?base:jstr(argjson,"coin"),rel,jbits256(argjson,"pubkey"),jprint(argjson,0)); } return(clonestr("{\"result\":\"success\"}")); } else if ( strcmp(method,"getmessages") == 0 ) { - //* if ( (retjson= LP_getmessages(jint(argjson,"firsti"),jint(argjson,"num"))) != 0 ) return(jprint(retjson,1)); else return(clonestr("{\"error\":\"null messages\"}")); } else if ( strcmp(method,"deletemessages") == 0 ) { - //* LP_deletemessages(jint(argjson,"firsti"),jint(argjson,"num")); return(clonestr("{\"result\":\"success\"}")); } @@ -204,9 +201,9 @@ dividends(coin, height, )\n\ price = jdouble(argjson,"price"); if ( strcmp(method,"setprice") == 0 ) { - //* if ( price > SMALLVAL ) { + //LP_signature_add(argjson,base,rel,(uint64_t)price * SATOSHIDEN); if ( LP_mypriceset(&changed,base,rel,price) < 0 ) return(clonestr("{\"error\":\"couldnt set price\"}")); //else if ( LP_mypriceset(&changed,rel,base,1./price) < 0 ) @@ -216,7 +213,7 @@ dividends(coin, height, )\n\ } else if ( strcmp(method,"autoprice") == 0 ) { - //* + //LP_signature_add(argjson,base,rel,(uint64_t)price * SATOSHIDEN); if ( LP_autoprice(base,rel,price,jdouble(argjson,"margin"),jstr(argjson,"type")) < 0 ) return(clonestr("{\"error\":\"couldnt set autoprice\"}")); else return(clonestr("{\"result\":\"success\"}")); diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 890d65174..87431732a 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -19,7 +19,7 @@ // marketmaker // // sign critical api calls -// SPV height errors, autodetect and fix +// -SPV height errors, autodetect and fix // stats // deal with offline pubkeys, reputations, etc. // dPoW security -> 2: KMD notarized, 3: BTC notarized diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 414e7cf51..ed9e8e8e2 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -473,7 +473,7 @@ int32_t LP_nearest_utxovalue(struct iguana_info *coin,char *coinaddr,struct LP_a LP_txheight_check(coin,coinaddr,up); if ( oldht != up->U.height ) up->SPV = LP_merkleproof(coin,backupep,up->U.txid,up->U.height); - if ( up->SPV == -1 ) + if ( up->SPV < 0 ) up->SPV = -2; } continue; diff --git a/iguana/exchanges/LP_utxo.c b/iguana/exchanges/LP_utxo.c index 0a0727038..e6085fc75 100644 --- a/iguana/exchanges/LP_utxo.c +++ b/iguana/exchanges/LP_utxo.c @@ -382,7 +382,7 @@ cJSON *LP_address_utxos(struct iguana_info *coin,char *coinaddr,int32_t electrum LP_txheight_check(coin,coinaddr,up); if ( oldht != up->U.height ) up->SPV = LP_merkleproof(coin,backupep,up->U.txid,up->U.height); - if ( up->SPV == -1 ) + if ( up->SPV < 0 ) up->SPV = -2; } if ( up->SPV > 0 )