From 0d0f5e8d5ebf880a36f872c7d78a19d25e48d698 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 09:27:01 +0200 Subject: [PATCH 01/34] OOT --- iguana/exchanges/LP_NXT.c | 4 +--- iguana/exchanges/coins | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_NXT.c b/iguana/exchanges/LP_NXT.c index 6bc320925..88626ec0f 100644 --- a/iguana/exchanges/LP_NXT.c +++ b/iguana/exchanges/LP_NXT.c @@ -202,9 +202,7 @@ void NXTventure_liquidation() cJSON *LP_NXT_redeems() { char url[1024],*retstr,*recv,*method,*msgstr,assetname[128]; uint64_t totals[2][sizeof(assetids)/sizeof(*assetids)],mult,txnum,assetid,qty; int32_t i,ind,numtx=0,past_marker=0; cJSON *item,*attach,*decjson,*array,*msgjson,*encjson,*retjson=0; - //sleep 1; fiat/supernet sendtoaddress RNZZuQYu8xJLZHuekhd96hYfoQuiCMz99T 1001.44150000 # txnum.8537615468620726612 - //sleep 1; fiat/pangea sendtoaddress RWMdRaUmMZqKkEibwEhY6XS3RLCXJDWHTi 22.10910000 # txnum.2649622877615958504 - uint64_t txnum_marker = calc_nxt64bits("8537615468620726612"); // 2649622877615958504"); // set to most recent processed + uint64_t txnum_marker = calc_nxt64bits("4114304329372848717"); // 8537615468620726612"); // set to most recent processed uint64_t txnum_marker2 = calc_nxt64bits("7256847492742571143"); // dont change, end marker char *passphrase = ""; char *account = "NXT-MRBN-8DFH-PFMK-A4DBM"; diff --git a/iguana/exchanges/coins b/iguana/exchanges/coins index b41a8b96f..ea4959342 100644 --- a/iguana/exchanges/coins +++ b/iguana/exchanges/coins @@ -1,3 +1,3 @@ -export coins="[{\"coin\":\"ZOI\",\"name\":\"zoin\",\"rpcport\":8255,\"pubtype\":80,\"p2shtype\":7,\"wiftype\":208,\"txfee\":1000}, {\"coin\": \"PIZZA\",\"asset\": \"PIZZA\",\"rpcport\": 11116},{\"coin\": \"BEER\",\"asset\": \"BEER\",\"rpcport\": 8923}, {\"coin\":\"GRS\",\"name\":\"groestlcoin\",\"rpcport\":1441,\"pubtype\":36,\"p2shtype\":5,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"XMCC\",\"name\":\"monoeci\",\"confpath\":\"${HOME#}/.monoeciCore/monoeci.conf\",\"rpcport\":24156,\"pubtype\":50,\"p2shtype\":73,\"wiftype\":77,\"txfee\":10000}, {\"coin\":\"BTCH\",\"asset\":\"BTCH\",\"rpcport\":8800},{\"coin\":\"ETOMIC\",\"asset\":\"ETOMIC\",\"rpcport\":10271},{\"coin\":\"AXO\",\"asset\":\"AXO\",\"rpcport\":12927},{\"coin\":\"CRC\",\"name\":\"crowdcoin\",\"confpath\":\"${HOME#}/.crowdcoincore/crowdcoin.conf\",\"rpcport\":11998,\"pubtype\":28,\"p2shtype\":88,\"wiftype\":0,\"txfee\":10000}, {\"coin\":\"VOT\",\"name\":\"votecoin\",\"rpcport\":8232,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"INN\",\"name\":\"innova\",\"confpath\":\"${HOME#}/.innovacore/innova.conf\",\"rpcport\":8818,\"pubtype\":102,\"p2shtype\":20,\"wiftype\":195,\"txfee\":10000}, {\"coin\":\"MOON\",\"name\":\"mooncoin\",\"rpcport\":44663,\"pubtype\":3,\"p2shtype\":22,\"wiftype\":131,\"txfee\":100000}, {\"coin\":\"CRW\",\"name\":\"crown\",\"rpcport\":9341,\"pubtype\":0,\"p2shtype\":28,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"EFL\",\"name\":\"egulden\",\"confpath\":\"${HOME#}/.egulden/coin.conf\",\"rpcport\":21015,\"pubtype\":48,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"GBX\",\"name\":\"gobyte\",\"confpath\":\"${HOME#}/.gobytecore/gobyte.conf\",\"rpcport\":12454,\"pubtype\":38,\"p2shtype\":10,\"wiftype\":198,\"txfee\":10000}, {\"coin\":\"BCO\",\"name\":\"bridgecoin\",\"rpcport\":6332,\"pubtype\":27,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"BLK\",\"name\":\"blackcoin\",\"confpath\":\"${HOME#}/.lore/blackcoin.conf\",\"isPoS\":1,\"rpcport\":15715,\"pubtype\":25,\"p2shtype\":85,\"wiftype\":153,\"txfee\":100000}, {\"coin\":\"BTG\",\"name\":\"bitcoingold\",\"rpcport\":8332,\"pubtype\":38,\"p2shtype\":23,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"BCH\",\"name\":\"bch\",\"rpcport\":33333,\"pubtype\":0,\"p2shtype\":5,\"wiftype\":128,\"txfee\":1000}, {\"coin\":\"ABY\",\"name\":\"applebyte\",\"rpcport\":8607,\"pubtype\":23,\"p2shtype\":5,\"wiftype\":151,\"txfee\":100000}, {\"coin\":\"STAK\",\"name\":\"straks\",\"rpcport\":7574,\"pubtype\":63,\"p2shtype\":5,\"wiftype\":204,\"txfee\":10000}, {\"coin\":\"XZC\",\"name\":\"zcoin\",\"rpcport\":8888,\"pubtype\":82,\"p2shtype\":7,\"wiftype\":210,\"txfee\":10000}, {\"coin\":\"QTUM\",\"name\":\"qtum\",\"rpcport\":3889,\"pubtype\":58,\"p2shtype\":50,\"wiftype\":128,\"txfee\":400000}, {\"coin\":\"PURA\",\"name\":\"pura\",\"rpcport\":55555,\"pubtype\":55,\"p2shtype\":16,\"wiftype\":150,\"txfee\":10000}, {\"coin\":\"DSR\",\"name\":\"desire\",\"confpath\":\"${HOME#}/.desirecore/desire.conf\",\"rpcport\":9918,\"pubtype\":30,\"p2shtype\":16,\"wiftype\":204,\"txfee\":10000}, {\"coin\":\"MNZ\",\"asset\":\"MNZ\",\"rpcport\":14337},{\"coin\":\"BTCZ\",\"name\":\"bitcoinz\",\"rpcport\":1979,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"MAGA\",\"name\":\"magacoin\",\"rpcport\":5332,\"pubtype\":23,\"p2shtype\":50,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"BSD\",\"name\":\"bitsend\",\"rpcport\":8800,\"pubtype\":102,\"p2shtype\":5,\"wiftype\":204,\"txfee\":10000}, {\"coin\":\"IOP\",\"name\":\"IoP\",\"rpcport\":8337,\"pubtype\":117,\"p2shtype\":174,\"wiftype\":49,\"txfee\":10000}, {\"coin\":\"BLOCK\",\"name\":\"blocknetdx\",\"rpcport\":41414,\"pubtype\":26,\"p2shtype\":28,\"wiftype\":154,\"txfee\":10000}, {\"coin\":\"CHIPS\", \"name\": \"chips\", \"rpcport\":57776,\"pubtype\":60, \"p2shtype\":85, \"wiftype\":188, \"txfee\":10000}, {\"coin\":\"888\",\"name\":\"octocoin\",\"rpcport\":22888,\"pubtype\":18,\"p2shtype\":5,\"wiftype\":176,\"txfee\":2000000}, {\"coin\":\"ARG\",\"name\":\"argentum\",\"rpcport\":13581,\"pubtype\":23,\"p2shtype\":5,\"wiftype\":151,\"txfee\":50000}, {\"coin\":\"GLT\",\"name\":\"globaltoken\",\"rpcport\":9320,\"pubtype\":38,\"p2shtype\":5,\"wiftype\":166,\"txfee\":10000}, {\"coin\":\"ZER\",\"name\":\"zero\",\"rpcport\":23801,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":1000}, {\"coin\":\"HODLC\",\"name\":\"hodlcoin\",\"rpcport\":11989,\"pubtype\":40,\"p2shtype\":5,\"wiftype\":168,\"txfee\":5000}, {\"coin\":\"UIS\",\"name\":\"unitus\",\"rpcport\":50604,\"pubtype\":68,\"p2shtype\":10,\"wiftype\":132,\"txfee\":2000000}, {\"coin\":\"HUC\",\"name\":\"huntercoin\",\"rpcport\":8399,\"pubtype\":40,\"p2shtype\":13,\"wiftype\":168,\"txfee\":100000}, {\"coin\":\"BDL\",\"name\":\"bitdeal\",\"rpcport\":9332,\"pubtype\":38,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"ARC\",\"name\":\"arcticcoin\",\"confpath\":\"${HOME#}/.arcticcore/arcticcoin.conf\",\"rpcport\":7208,\"pubtype\":23,\"p2shtype\":8,\"wiftype\":176,\"txfee\":10000}, {\"coin\":\"ZCL\",\"name\":\"zclassic\",\"rpcport\":8023,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":1000}, {\"coin\":\"VIA\",\"name\":\"viacoin\",\"rpcport\":5222,\"pubtype\":71,\"p2shtype\":33,\"wiftype\":199,\"txfee\":100000}, {\"coin\":\"ERC\",\"name\":\"europecoin\",\"rpcport\":11989,\"pubtype\":33,\"p2shtype\":5,\"wiftype\":168,\"txfee\":10000},{\"coin\":\"FAIR\",\"name\":\"faircoin\",\"confpath\":\"${HOME#}/.faircoin2/faircoin.conf\",\"rpcport\":40405,\"pubtype\":95,\"p2shtype\":36,\"wiftype\":223,\"txfee\":1000000}, {\"coin\":\"FLO\",\"name\":\"florincoin\",\"rpcport\":7313,\"pubtype\":35,\"p2shtype\":8,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"SXC\",\"name\":\"sexcoin\",\"rpcport\":9561,\"pubtype\":62,\"p2shtype\":5,\"wiftype\":190,\"txfee\":100000}, {\"coin\":\"CREA\",\"name\":\"creativecoin\",\"rpcport\":17711,\"pubtype\":28,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"TRC\",\"name\":\"terracoin\",\"confpath\":\"${HOME#}/.terracoincore/terracoin.conf\",\"rpcport\":13332,\"pubtype\":0,\"p2shtype\":5,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"BTA\",\"name\":\"bata\",\"rpcport\":5493,\"pubtype\":25,\"p2shtype\":5,\"wiftype\":188,\"txfee\":100000}, {\"coin\":\"SMC\",\"name\":\"smartcoin\",\"rpcport\":58583,\"pubtype\":63,\"p2shtype\":5,\"wiftype\":191,\"txfee\":1000000}, {\"coin\":\"NMC\",\"name\":\"namecoin\",\"rpcport\":8336,\"pubtype\":52,\"p2shtype\":13,\"wiftype\":180,\"txfee\":100000}, {\"coin\":\"NAV\",\"name\":\"navcoin\",\"isPoS\":1,\"confpath\":\"${HOME#}/.navcoin4/navcoin.conf\",\"rpcport\":44444,\"pubtype\":53,\"p2shtype\":85,\"wiftype\":150,\"txfee\":10000}, {\"coin\":\"EMC2\",\"name\":\"einsteinium\",\"rpcport\":41879,\"pubtype\":33,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000},{\"coin\":\"SYS\",\"name\":\"syscoin\",\"rpcport\":8370,\"pubtype\":0,\"p2shtype\":5,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"I0C\",\"name\":\"i0coin\",\"rpcport\":7332,\"pubtype\":105,\"p2shtype\":5,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"DASH\",\"confpath\":\"${HOME#}/.dashcore/dash.conf\",\"name\":\"dashcore\",\"rpcport\":9998,\"pubtype\":76,\"p2shtype\":16,\"wiftype\":204,\"txfee\":10000}, {\"coin\":\"STRAT\", \"name\": \"stratis\", \"active\":0, \"rpcport\":16174,\"pubtype\":63, \"p2shtype\":125, \"wiftype\":191, \"txfee\":10000}, {\"confpath\":\"${HOME#}/.muecore/mue.conf\",\"coin\":\"MUE\",\"name\":\"muecore\",\"rpcport\":29683,\"pubtype\":16,\"p2shtype\":76,\"wiftype\":126,\"txfee\":10000}, {\"coin\":\"MONA\",\"name\":\"monacoin\",\"rpcport\":9402,\"pubtype\":50,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000},{\"coin\":\"XMY\",\"name\":\"myriadcoin\",\"rpcport\":10889,\"pubtype\":50,\"p2shtype\":9,\"wiftype\":178,\"txfee\":5000}, {\"coin\":\"MAC\",\"name\":\"machinecoin\",\"rpcport\":40332,\"pubtype\":50,\"p2shtype\":5,\"wiftype\":178,\"txfee\":100000}, {\"coin\":\"BTX\",\"name\":\"bitcore\",\"rpcport\":8556,\"pubtype\":0,\"p2shtype\":5,\"wiftype\":128,\"txfee\":50000}, {\"coin\":\"XRE\",\"name\":\"revolvercoin\",\"rpcport\":8775,\"pubtype\":0,\"p2shtype\":5,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"LBC\",\"name\":\"lbrycrd\",\"rpcport\":9245,\"pubtype\":85,\"p2shtype\":122,\"wiftype\":28,\"txfee\":10000}, {\"coin\":\"SIB\",\"name\":\"sibcoin\",\"rpcport\":1944,\"pubtype\":63,\"p2shtype\":40,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"VTC\", \"name\":\"vertcoin\", \"rpcport\":5888, \"pubtype\":71, \"p2shtype\":5, \"wiftype\":128, \"txfee\":100000 }, {\"coin\":\"REVS\",\"active\":0, \"asset\":\"REVS\",\"rpcport\":10196}, {\"coin\":\"JUMBLR\",\"active\":0, \"asset\":\"JUMBLR\",\"rpcport\":15106}, {\"coin\":\"DOGE\",\"name\":\"dogecoin\",\"rpcport\":22555,\"pubtype\":30,\"p2shtype\":22,\"wiftype\":158,\"txfee\":100000000}, {\"coin\":\"HUSH\",\"name\":\"hush\",\"rpcport\":8822,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":1000 }, {\"active\":0,\"coin\":\"ZEC\",\"name\":\"zcash\",\"rpcport\":8232,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":10000 }, {\"coin\":\"DGB\",\"name\":\"digibyte\",\"rpcport\":14022,\"pubtype\":30,\"p2shtype\":5,\"wiftype\":128,\"txfee\":100000}, {\"coin\":\"ZET\", \"name\":\"zetacoin\", \"pubtype\":80, \"p2shtype\":9,\"rpcport\":8332, \"wiftype\":224, \"txfee\":10000}, {\"coin\":\"GAME\", \"rpcport\":40001, \"name\":\"gamecredits\", \"pubtype\":38, \"p2shtype\":5, \"wiftype\":166, \"txfee\":100000}, {\"coin\":\"LTC\", \"name\":\"litecoin\", \"rpcport\":9332, \"pubtype\":48, \"p2shtype\":5, \"wiftype\":176, \"txfee\":100000 }, {\"coin\":\"SUPERNET\",\"asset\":\"SUPERNET\",\"rpcport\":11341}, {\"coin\":\"WLC\",\"asset\":\"WLC\",\"rpcport\":12167}, {\"coin\":\"PANGEA\",\"asset\":\"PANGEA\",\"rpcport\":14068}, {\"coin\":\"DEX\",\"asset\":\"DEX\",\"rpcport\":11890}, {\"coin\":\"BET\",\"asset\":\"BET\",\"rpcport\":14250}, {\"coin\":\"CRYPTO\",\"asset\":\"CRYPTO\",\"rpcport\":8516}, {\"coin\":\"HODL\",\"asset\":\"HODL\",\"rpcport\":14431}, {\"coin\":\"MSHARK\",\"asset\":\"MSHARK\",\"rpcport\":8846}, {\"coin\":\"BOTS\",\"asset\":\"BOTS\",\"rpcport\":11964}, {\"coin\":\"MGW\",\"asset\":\"MGW\",\"rpcport\":12386}, {\"coin\":\"COQUI\",\"asset\":\"COQUI\",\"rpcport\":14276}, {\"coin\":\"KV\",\"asset\":\"KV\",\"rpcport\":8299}, {\"coin\":\"CEAL\",\"asset\":\"CEAL\",\"rpcport\":11116}, {\"coin\":\"MESH\",\"asset\":\"MESH\",\"rpcport\":9455}]" +export coins="[{\"coin\":\"OOT\",\"asset\":\"OOT\",\"rpcport\":12467}, {\"coin\":\"ZOI\",\"name\":\"zoin\",\"rpcport\":8255,\"pubtype\":80,\"p2shtype\":7,\"wiftype\":208,\"txfee\":1000}, {\"coin\": \"PIZZA\",\"asset\": \"PIZZA\",\"rpcport\": 11116},{\"coin\": \"BEER\",\"asset\": \"BEER\",\"rpcport\": 8923}, {\"coin\":\"GRS\",\"name\":\"groestlcoin\",\"rpcport\":1441,\"pubtype\":36,\"p2shtype\":5,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"XMCC\",\"name\":\"monoeci\",\"confpath\":\"${HOME#}/.monoeciCore/monoeci.conf\",\"rpcport\":24156,\"pubtype\":50,\"p2shtype\":73,\"wiftype\":77,\"txfee\":10000}, {\"coin\":\"BTCH\",\"asset\":\"BTCH\",\"rpcport\":8800},{\"coin\":\"ETOMIC\",\"asset\":\"ETOMIC\",\"rpcport\":10271},{\"coin\":\"AXO\",\"asset\":\"AXO\",\"rpcport\":12927},{\"coin\":\"CRC\",\"name\":\"crowdcoin\",\"confpath\":\"${HOME#}/.crowdcoincore/crowdcoin.conf\",\"rpcport\":11998,\"pubtype\":28,\"p2shtype\":88,\"wiftype\":0,\"txfee\":10000}, {\"coin\":\"VOT\",\"name\":\"votecoin\",\"rpcport\":8232,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"INN\",\"name\":\"innova\",\"confpath\":\"${HOME#}/.innovacore/innova.conf\",\"rpcport\":8818,\"pubtype\":102,\"p2shtype\":20,\"wiftype\":195,\"txfee\":10000}, {\"coin\":\"MOON\",\"name\":\"mooncoin\",\"rpcport\":44663,\"pubtype\":3,\"p2shtype\":22,\"wiftype\":131,\"txfee\":100000}, {\"coin\":\"CRW\",\"name\":\"crown\",\"rpcport\":9341,\"pubtype\":0,\"p2shtype\":28,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"EFL\",\"name\":\"egulden\",\"confpath\":\"${HOME#}/.egulden/coin.conf\",\"rpcport\":21015,\"pubtype\":48,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"GBX\",\"name\":\"gobyte\",\"confpath\":\"${HOME#}/.gobytecore/gobyte.conf\",\"rpcport\":12454,\"pubtype\":38,\"p2shtype\":10,\"wiftype\":198,\"txfee\":10000}, {\"coin\":\"BCO\",\"name\":\"bridgecoin\",\"rpcport\":6332,\"pubtype\":27,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"BLK\",\"name\":\"blackcoin\",\"confpath\":\"${HOME#}/.lore/blackcoin.conf\",\"isPoS\":1,\"rpcport\":15715,\"pubtype\":25,\"p2shtype\":85,\"wiftype\":153,\"txfee\":100000}, {\"coin\":\"BTG\",\"name\":\"bitcoingold\",\"rpcport\":8332,\"pubtype\":38,\"p2shtype\":23,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"BCH\",\"name\":\"bch\",\"rpcport\":33333,\"pubtype\":0,\"p2shtype\":5,\"wiftype\":128,\"txfee\":1000}, {\"coin\":\"ABY\",\"name\":\"applebyte\",\"rpcport\":8607,\"pubtype\":23,\"p2shtype\":5,\"wiftype\":151,\"txfee\":100000}, {\"coin\":\"STAK\",\"name\":\"straks\",\"rpcport\":7574,\"pubtype\":63,\"p2shtype\":5,\"wiftype\":204,\"txfee\":10000}, {\"coin\":\"XZC\",\"name\":\"zcoin\",\"rpcport\":8888,\"pubtype\":82,\"p2shtype\":7,\"wiftype\":210,\"txfee\":10000}, {\"coin\":\"QTUM\",\"name\":\"qtum\",\"rpcport\":3889,\"pubtype\":58,\"p2shtype\":50,\"wiftype\":128,\"txfee\":400000}, {\"coin\":\"PURA\",\"name\":\"pura\",\"rpcport\":55555,\"pubtype\":55,\"p2shtype\":16,\"wiftype\":150,\"txfee\":10000}, {\"coin\":\"DSR\",\"name\":\"desire\",\"confpath\":\"${HOME#}/.desirecore/desire.conf\",\"rpcport\":9918,\"pubtype\":30,\"p2shtype\":16,\"wiftype\":204,\"txfee\":10000}, {\"coin\":\"MNZ\",\"asset\":\"MNZ\",\"rpcport\":14337},{\"coin\":\"BTCZ\",\"name\":\"bitcoinz\",\"rpcport\":1979,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"MAGA\",\"name\":\"magacoin\",\"rpcport\":5332,\"pubtype\":23,\"p2shtype\":50,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"BSD\",\"name\":\"bitsend\",\"rpcport\":8800,\"pubtype\":102,\"p2shtype\":5,\"wiftype\":204,\"txfee\":10000}, {\"coin\":\"IOP\",\"name\":\"IoP\",\"rpcport\":8337,\"pubtype\":117,\"p2shtype\":174,\"wiftype\":49,\"txfee\":10000}, {\"coin\":\"BLOCK\",\"name\":\"blocknetdx\",\"rpcport\":41414,\"pubtype\":26,\"p2shtype\":28,\"wiftype\":154,\"txfee\":10000}, {\"coin\":\"CHIPS\", \"name\": \"chips\", \"rpcport\":57776,\"pubtype\":60, \"p2shtype\":85, \"wiftype\":188, \"txfee\":10000}, {\"coin\":\"888\",\"name\":\"octocoin\",\"rpcport\":22888,\"pubtype\":18,\"p2shtype\":5,\"wiftype\":176,\"txfee\":2000000}, {\"coin\":\"ARG\",\"name\":\"argentum\",\"rpcport\":13581,\"pubtype\":23,\"p2shtype\":5,\"wiftype\":151,\"txfee\":50000}, {\"coin\":\"GLT\",\"name\":\"globaltoken\",\"rpcport\":9320,\"pubtype\":38,\"p2shtype\":5,\"wiftype\":166,\"txfee\":10000}, {\"coin\":\"ZER\",\"name\":\"zero\",\"rpcport\":23801,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":1000}, {\"coin\":\"HODLC\",\"name\":\"hodlcoin\",\"rpcport\":11989,\"pubtype\":40,\"p2shtype\":5,\"wiftype\":168,\"txfee\":5000}, {\"coin\":\"UIS\",\"name\":\"unitus\",\"rpcport\":50604,\"pubtype\":68,\"p2shtype\":10,\"wiftype\":132,\"txfee\":2000000}, {\"coin\":\"HUC\",\"name\":\"huntercoin\",\"rpcport\":8399,\"pubtype\":40,\"p2shtype\":13,\"wiftype\":168,\"txfee\":100000}, {\"coin\":\"BDL\",\"name\":\"bitdeal\",\"rpcport\":9332,\"pubtype\":38,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"ARC\",\"name\":\"arcticcoin\",\"confpath\":\"${HOME#}/.arcticcore/arcticcoin.conf\",\"rpcport\":7208,\"pubtype\":23,\"p2shtype\":8,\"wiftype\":176,\"txfee\":10000}, {\"coin\":\"ZCL\",\"name\":\"zclassic\",\"rpcport\":8023,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":1000}, {\"coin\":\"VIA\",\"name\":\"viacoin\",\"rpcport\":5222,\"pubtype\":71,\"p2shtype\":33,\"wiftype\":199,\"txfee\":100000}, {\"coin\":\"ERC\",\"name\":\"europecoin\",\"rpcport\":11989,\"pubtype\":33,\"p2shtype\":5,\"wiftype\":168,\"txfee\":10000},{\"coin\":\"FAIR\",\"name\":\"faircoin\",\"confpath\":\"${HOME#}/.faircoin2/faircoin.conf\",\"rpcport\":40405,\"pubtype\":95,\"p2shtype\":36,\"wiftype\":223,\"txfee\":1000000}, {\"coin\":\"FLO\",\"name\":\"florincoin\",\"rpcport\":7313,\"pubtype\":35,\"p2shtype\":8,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"SXC\",\"name\":\"sexcoin\",\"rpcport\":9561,\"pubtype\":62,\"p2shtype\":5,\"wiftype\":190,\"txfee\":100000}, {\"coin\":\"CREA\",\"name\":\"creativecoin\",\"rpcport\":17711,\"pubtype\":28,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000}, {\"coin\":\"TRC\",\"name\":\"terracoin\",\"confpath\":\"${HOME#}/.terracoincore/terracoin.conf\",\"rpcport\":13332,\"pubtype\":0,\"p2shtype\":5,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"BTA\",\"name\":\"bata\",\"rpcport\":5493,\"pubtype\":25,\"p2shtype\":5,\"wiftype\":188,\"txfee\":100000}, {\"coin\":\"SMC\",\"name\":\"smartcoin\",\"rpcport\":58583,\"pubtype\":63,\"p2shtype\":5,\"wiftype\":191,\"txfee\":1000000}, {\"coin\":\"NMC\",\"name\":\"namecoin\",\"rpcport\":8336,\"pubtype\":52,\"p2shtype\":13,\"wiftype\":180,\"txfee\":100000}, {\"coin\":\"NAV\",\"name\":\"navcoin\",\"isPoS\":1,\"confpath\":\"${HOME#}/.navcoin4/navcoin.conf\",\"rpcport\":44444,\"pubtype\":53,\"p2shtype\":85,\"wiftype\":150,\"txfee\":10000}, {\"coin\":\"EMC2\",\"name\":\"einsteinium\",\"rpcport\":41879,\"pubtype\":33,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000},{\"coin\":\"SYS\",\"name\":\"syscoin\",\"rpcport\":8370,\"pubtype\":0,\"p2shtype\":5,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"I0C\",\"name\":\"i0coin\",\"rpcport\":7332,\"pubtype\":105,\"p2shtype\":5,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"DASH\",\"confpath\":\"${HOME#}/.dashcore/dash.conf\",\"name\":\"dashcore\",\"rpcport\":9998,\"pubtype\":76,\"p2shtype\":16,\"wiftype\":204,\"txfee\":10000}, {\"coin\":\"STRAT\", \"name\": \"stratis\", \"active\":0, \"rpcport\":16174,\"pubtype\":63, \"p2shtype\":125, \"wiftype\":191, \"txfee\":10000}, {\"confpath\":\"${HOME#}/.muecore/mue.conf\",\"coin\":\"MUE\",\"name\":\"muecore\",\"rpcport\":29683,\"pubtype\":16,\"p2shtype\":76,\"wiftype\":126,\"txfee\":10000}, {\"coin\":\"MONA\",\"name\":\"monacoin\",\"rpcport\":9402,\"pubtype\":50,\"p2shtype\":5,\"wiftype\":176,\"txfee\":100000},{\"coin\":\"XMY\",\"name\":\"myriadcoin\",\"rpcport\":10889,\"pubtype\":50,\"p2shtype\":9,\"wiftype\":178,\"txfee\":5000}, {\"coin\":\"MAC\",\"name\":\"machinecoin\",\"rpcport\":40332,\"pubtype\":50,\"p2shtype\":5,\"wiftype\":178,\"txfee\":100000}, {\"coin\":\"BTX\",\"name\":\"bitcore\",\"rpcport\":8556,\"pubtype\":0,\"p2shtype\":5,\"wiftype\":128,\"txfee\":50000}, {\"coin\":\"XRE\",\"name\":\"revolvercoin\",\"rpcport\":8775,\"pubtype\":0,\"p2shtype\":5,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"LBC\",\"name\":\"lbrycrd\",\"rpcport\":9245,\"pubtype\":85,\"p2shtype\":122,\"wiftype\":28,\"txfee\":10000}, {\"coin\":\"SIB\",\"name\":\"sibcoin\",\"rpcport\":1944,\"pubtype\":63,\"p2shtype\":40,\"wiftype\":128,\"txfee\":10000}, {\"coin\":\"VTC\", \"name\":\"vertcoin\", \"rpcport\":5888, \"pubtype\":71, \"p2shtype\":5, \"wiftype\":128, \"txfee\":100000 }, {\"coin\":\"REVS\",\"active\":0, \"asset\":\"REVS\",\"rpcport\":10196}, {\"coin\":\"JUMBLR\",\"active\":0, \"asset\":\"JUMBLR\",\"rpcport\":15106}, {\"coin\":\"DOGE\",\"name\":\"dogecoin\",\"rpcport\":22555,\"pubtype\":30,\"p2shtype\":22,\"wiftype\":158,\"txfee\":100000000}, {\"coin\":\"HUSH\",\"name\":\"hush\",\"rpcport\":8822,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":1000 }, {\"active\":0,\"coin\":\"ZEC\",\"name\":\"zcash\",\"rpcport\":8232,\"taddr\":28,\"pubtype\":184,\"p2shtype\":189,\"wiftype\":128,\"txfee\":10000 }, {\"coin\":\"DGB\",\"name\":\"digibyte\",\"rpcport\":14022,\"pubtype\":30,\"p2shtype\":5,\"wiftype\":128,\"txfee\":100000}, {\"coin\":\"ZET\", \"name\":\"zetacoin\", \"pubtype\":80, \"p2shtype\":9,\"rpcport\":8332, \"wiftype\":224, \"txfee\":10000}, {\"coin\":\"GAME\", \"rpcport\":40001, \"name\":\"gamecredits\", \"pubtype\":38, \"p2shtype\":5, \"wiftype\":166, \"txfee\":100000}, {\"coin\":\"LTC\", \"name\":\"litecoin\", \"rpcport\":9332, \"pubtype\":48, \"p2shtype\":5, \"wiftype\":176, \"txfee\":100000 }, {\"coin\":\"SUPERNET\",\"asset\":\"SUPERNET\",\"rpcport\":11341}, {\"coin\":\"WLC\",\"asset\":\"WLC\",\"rpcport\":12167}, {\"coin\":\"PANGEA\",\"asset\":\"PANGEA\",\"rpcport\":14068}, {\"coin\":\"DEX\",\"asset\":\"DEX\",\"rpcport\":11890}, {\"coin\":\"BET\",\"asset\":\"BET\",\"rpcport\":14250}, {\"coin\":\"CRYPTO\",\"asset\":\"CRYPTO\",\"rpcport\":8516}, {\"coin\":\"HODL\",\"asset\":\"HODL\",\"rpcport\":14431}, {\"coin\":\"MSHARK\",\"asset\":\"MSHARK\",\"rpcport\":8846}, {\"coin\":\"BOTS\",\"asset\":\"BOTS\",\"rpcport\":11964}, {\"coin\":\"MGW\",\"asset\":\"MGW\",\"rpcport\":12386}, {\"coin\":\"COQUI\",\"asset\":\"COQUI\",\"rpcport\":14276}, {\"coin\":\"KV\",\"asset\":\"KV\",\"rpcport\":8299}, {\"coin\":\"CEAL\",\"asset\":\"CEAL\",\"rpcport\":11116}, {\"coin\":\"MESH\",\"asset\":\"MESH\",\"rpcport\":9455}]" #, {\"coin\":\"AUD\",\"asset\":\"AUD\",\"rpcport\":8045}, {\"coin\":\"BGN\",\"asset\":\"BGN\",\"rpcport\":9110}, {\"coin\":\"CAD\",\"asset\":\"CAD\",\"rpcport\":8720}, {\"coin\":\"CHF\",\"asset\":\"CHF\",\"rpcport\":15312}, {\"coin\":\"CNY\",\"asset\":\"CNY\",\"rpcport\":10384}, {\"coin\":\"CZK\",\"asset\":\"CZK\",\"rpcport\":9482}, {\"coin\":\"DKK\",\"asset\":\"DKK\",\"rpcport\":13830}, {\"coin\":\"EUR\",\"asset\":\"EUR\",\"rpcport\":8065}, {\"coin\":\"GBP\",\"asset\":\"GBP\",\"rpcport\":11505}, {\"coin\":\"HKD\",\"asset\":\"HKD\",\"rpcport\":15409}, {\"coin\":\"HRK\",\"asset\":\"HRK\",\"rpcport\":12617}, {\"coin\":\"HUF\",\"asset\":\"HUF\",\"rpcport\":13699}, {\"coin\":\"IDR\",\"asset\":\"IDR\",\"rpcport\":14459}, {\"coin\":\"ILS\",\"asset\":\"ILS\",\"rpcport\":14638}, {\"coin\":\"INR\",\"asset\":\"INR\",\"rpcport\":10536}, {\"coin\":\"JPY\",\"asset\":\"JPY\",\"rpcport\":13145}, {\"coin\":\"KRW\",\"asset\":\"KRW\",\"rpcport\":14020}, {\"coin\":\"MXN\",\"asset\":\"MXN\",\"rpcport\":13970}, {\"coin\":\"MYR\",\"asset\":\"MYR\",\"rpcport\":10688}, {\"coin\":\"NOK\",\"asset\":\"NOK\",\"rpcport\":11588}, {\"coin\":\"NZD\",\"asset\":\"NZD\",\"rpcport\":10915}, {\"coin\":\"PHP\",\"asset\":\"PHP\",\"rpcport\":11181}, {\"coin\":\"PLN\",\"asset\":\"PLN\",\"rpcport\":13493}, {\"coin\":\"BRL\",\"asset\":\"BRL\",\"rpcport\":9914}, {\"coin\":\"RON\",\"asset\":\"RON\",\"rpcport\":8675}, {\"coin\":\"RUB\",\"asset\":\"RUB\",\"rpcport\":8199}, {\"coin\":\"SEK\",\"asset\":\"SEK\",\"rpcport\":11447}, {\"coin\":\"SGD\",\"asset\":\"SGD\",\"rpcport\":14475}, {\"coin\":\"THB\",\"asset\":\"THB\",\"rpcport\":11847}, {\"coin\":\"TRY\",\"asset\":\"TRY\",\"rpcport\":13924}, {\"coin\":\"USD\",\"asset\":\"USD\",\"rpcport\":13967}, {\"coin\":\"ZAR\",\"asset\":\"ZAR\",\"rpcport\":15160}]" #{\"coin\":\"PIVX\",\"name\":\"pivx\",\"rpcport\":51473,\"pubtype\":30,\"p2shtype\":13,\"wiftype\":212,\"txfee\":10000}, From 267a5f485982a6fcf7c28561abeb8116ed616d63 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 10:16:13 +0200 Subject: [PATCH 02/34] Test --- iguana/exchanges/prices/autoprice | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/prices/autoprice b/iguana/exchanges/prices/autoprice index eb3b53851..c3750a157 100755 --- a/iguana/exchanges/prices/autoprice +++ b/iguana/exchanges/prices/autoprice @@ -10,7 +10,7 @@ curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\ curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"HUSH\",\"rel\":\"KMD\",\"margin\":$margin,\"refbase\":\"hush\",\"refrel\":\"coinmarketcap\"}" curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"KMD\",\"rel\":\"BTCH\",\"offset\":0.0,\"refbase\":\"KMD\",\"refrel\":\"HUSH\",\"factor\":1.44,\"buymargin\":0.05,\"sellmargin\":0.05}" -curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BTCH\",\"rel\":\"KMD\",\"offset\":0.0,\"refbase\":\"HUSH\",\"refrel\":\"KMD\",\"factor\":0.7,\"buymargin\":0.05,\"sellmargin\":0.05}" +#curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BTCH\",\"rel\":\"KMD\",\"offset\":0.0,\"refbase\":\"HUSH\",\"refrel\":\"KMD\",\"factor\":0.7,\"buymargin\":0.05,\"sellmargin\":0.05}" curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BEER\",\"rel\":\"PIZZA\",\"fixed\":0.0001,\"margin\":0.00001}" From 4d70b29aadc55d9f92332a1fae298d97dd60238a Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 17:29:21 +0200 Subject: [PATCH 03/34] -BTCH autoprice --- iguana/exchanges/prices/autoprice | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/prices/autoprice b/iguana/exchanges/prices/autoprice index c3750a157..e4e261d86 100755 --- a/iguana/exchanges/prices/autoprice +++ b/iguana/exchanges/prices/autoprice @@ -9,7 +9,7 @@ curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\ #curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"KMD\",\"rel\":\"MNZ\",\"offset\":0.0,\"refbase\":\"KMD\",\"refrel\":\"BTC\",\"factor\":15000,\"margin\":-0.2}" curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"HUSH\",\"rel\":\"KMD\",\"margin\":$margin,\"refbase\":\"hush\",\"refrel\":\"coinmarketcap\"}" -curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"KMD\",\"rel\":\"BTCH\",\"offset\":0.0,\"refbase\":\"KMD\",\"refrel\":\"HUSH\",\"factor\":1.44,\"buymargin\":0.05,\"sellmargin\":0.05}" +#curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"KMD\",\"rel\":\"BTCH\",\"offset\":0.0,\"refbase\":\"KMD\",\"refrel\":\"HUSH\",\"factor\":1.44,\"buymargin\":0.05,\"sellmargin\":0.05}" #curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BTCH\",\"rel\":\"KMD\",\"offset\":0.0,\"refbase\":\"HUSH\",\"refrel\":\"KMD\",\"factor\":0.7,\"buymargin\":0.05,\"sellmargin\":0.05}" curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BEER\",\"rel\":\"PIZZA\",\"fixed\":0.0001,\"margin\":0.00001}" From aef5276edc83da61c8aa40f0cf0364cf9b2e7981 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 18:59:35 +0200 Subject: [PATCH 04/34] P2sh addrs --- iguana/exchanges/mm.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index db8bc57b7..f6080de12 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -190,6 +190,39 @@ int main(int argc, const char * argv[]) printf("done vanitygen.(%s) done %u elapsed %d\n",argv[2],(uint32_t)time(NULL),(uint32_t)time(NULL) - timestamp); exit(0); } + else if ( argv[1] != 0 && strcmp(argv[1],"airdropH") == 0 && argv[2] != 0 ) + { + FILE *fp; double val,total = 0.; uint8_t addrtype,rmd160[20]; char buf[256],coinaddr[64]; int32_t n,i; char *flag; + if ( (fp= fopen(argv[2],"rb")) != 0 ) + { + while ( fgets(buf,sizeof(buf),fp) > 0 ) + { + if ( (n= (int32_t)strlen(buf)) > 0 ) + buf[--n] = 0; + flag = 0; + for (i=0; i Date: Fri, 2 Feb 2018 19:06:12 +0200 Subject: [PATCH 05/34] Test --- iguana/exchanges/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index f6080de12..b9edb3ec7 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -215,7 +215,7 @@ int main(int argc, const char * argv[]) bitcoin_address("KMD",coinaddr,0,addrtype == 184 ? 60 : 85,rmd160,20); val = atof(flag); total += val; - printf("(%s) (%s) <- %.8f total %.8f\n",buf,coinaddr,val,total); + printf("(%s).%d (%s) <- %.8f total %.8f\n",buf,addrtype,coinaddr,val,total); } else printf("parse error for (%s)\n",buf); } printf("close (%s)\n",argv[2]); From 623359e8bdf419963c9ab3508c77611c0d0d50de Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 19:11:06 +0200 Subject: [PATCH 06/34] Test --- iguana/exchanges/mm.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index b9edb3ec7..e133bcbd0 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -192,7 +192,7 @@ int main(int argc, const char * argv[]) } else if ( argv[1] != 0 && strcmp(argv[1],"airdropH") == 0 && argv[2] != 0 ) { - FILE *fp; double val,total = 0.; uint8_t addrtype,rmd160[20]; char buf[256],coinaddr[64]; int32_t n,i; char *flag; + FILE *fp; double val,total = 0.; uint8_t checktype,addrtype,rmd160[20],checkrmd160[20]; char buf[256],checkaddr[64],coinaddr[64]; int32_t n,i; char *flag; if ( (fp= fopen(argv[2],"rb")) != 0 ) { while ( fgets(buf,sizeof(buf),fp) > 0 ) @@ -213,9 +213,16 @@ int main(int argc, const char * argv[]) { bitcoin_addr2rmd160("HUSH",28,&addrtype,rmd160,buf); bitcoin_address("KMD",coinaddr,0,addrtype == 184 ? 60 : 85,rmd160,20); - val = atof(flag); - total += val; - printf("(%s).%d (%s) <- %.8f total %.8f\n",buf,addrtype,coinaddr,val,total); + bitcoin_addr2rmd160("KMD",0,&checktype,checkrmd160,coinaddr); + bitcoin_address("HUSH",checkaddr,28,addrtype == 60 ? 184 : 189,checkrmd160,20); + if ( memcmp(rmd160,checkrmd160,20) != 0 || strcmp(coinaddr,checkaddr) != 0 ) + printf("address calc error (%s) -> (%s) -> (%s)?\n",buf,coinaddr,checkaddr); + else + { + val = atof(flag); + total += val; + printf("(%s).%d (%s) <- %.8f total %.8f\n",buf,addrtype,coinaddr,val,total); + } } else printf("parse error for (%s)\n",buf); } printf("close (%s)\n",argv[2]); From 8104baa8943bcbe915d6d5b58619166dfd90b180 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 19:15:22 +0200 Subject: [PATCH 07/34] Test --- iguana/exchanges/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index e133bcbd0..6a946bf6f 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -214,7 +214,7 @@ int main(int argc, const char * argv[]) bitcoin_addr2rmd160("HUSH",28,&addrtype,rmd160,buf); bitcoin_address("KMD",coinaddr,0,addrtype == 184 ? 60 : 85,rmd160,20); bitcoin_addr2rmd160("KMD",0,&checktype,checkrmd160,coinaddr); - bitcoin_address("HUSH",checkaddr,28,addrtype == 60 ? 184 : 189,checkrmd160,20); + bitcoin_address("HUSH",checkaddr,28,checktype == 60 ? 184 : 189,checkrmd160,20); if ( memcmp(rmd160,checkrmd160,20) != 0 || strcmp(coinaddr,checkaddr) != 0 ) printf("address calc error (%s) -> (%s) -> (%s)?\n",buf,coinaddr,checkaddr); else From f990a0786554385e50ddab3ad07e2c5a7a0aa78e Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 19:18:02 +0200 Subject: [PATCH 08/34] Test --- iguana/exchanges/mm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index 6a946bf6f..a0bbe3dcf 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -192,7 +192,7 @@ int main(int argc, const char * argv[]) } else if ( argv[1] != 0 && strcmp(argv[1],"airdropH") == 0 && argv[2] != 0 ) { - FILE *fp; double val,total = 0.; uint8_t checktype,addrtype,rmd160[20],checkrmd160[20]; char buf[256],checkaddr[64],coinaddr[64]; int32_t n,i; char *flag; + FILE *fp; double val,total = 0.; uint8_t checktype,addrtype,rmd160[21],checkrmd160[21]; char buf[256],checkaddr[64],coinaddr[64]; int32_t n,i; char *flag; if ( (fp= fopen(argv[2],"rb")) != 0 ) { while ( fgets(buf,sizeof(buf),fp) > 0 ) @@ -216,7 +216,14 @@ int main(int argc, const char * argv[]) bitcoin_addr2rmd160("KMD",0,&checktype,checkrmd160,coinaddr); bitcoin_address("HUSH",checkaddr,28,checktype == 60 ? 184 : 189,checkrmd160,20); if ( memcmp(rmd160,checkrmd160,20) != 0 || strcmp(coinaddr,checkaddr) != 0 ) - printf("address calc error (%s) -> (%s) -> (%s)?\n",buf,coinaddr,checkaddr); + { + for (i=0; i<20; i++) + printf("%02x",rmd160[i]); + printf(" vs. "); + for (i=0; i<20; i++) + printf("%02x",checkrmd160[i]); + printf(" address calc error (%s) -> (%s) -> (%s)?\n",buf,coinaddr,checkaddr); + } else { val = atof(flag); From 0dfababd5364e3d65364273295c8594c0482deb4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 19:20:09 +0200 Subject: [PATCH 09/34] Test --- iguana/exchanges/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index a0bbe3dcf..bf3cd38b3 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -222,7 +222,7 @@ int main(int argc, const char * argv[]) printf(" vs. "); for (i=0; i<20; i++) printf("%02x",checkrmd160[i]); - printf(" address calc error (%s) -> (%s) -> (%s)?\n",buf,coinaddr,checkaddr); + printf(" address calc error (%s) -> (%s) -> (%s) %d %d?\n",buf,coinaddr,checkaddr,memcmp(rmd160,checkrmd160,20),strcmp(coinaddr,checkaddr)); } else { From f15de8bda2548394e50107dbc1e3b0807ba8665a Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 19:22:36 +0200 Subject: [PATCH 10/34] Test --- iguana/exchanges/mm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index bf3cd38b3..c0b964fdb 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -215,14 +215,14 @@ int main(int argc, const char * argv[]) bitcoin_address("KMD",coinaddr,0,addrtype == 184 ? 60 : 85,rmd160,20); bitcoin_addr2rmd160("KMD",0,&checktype,checkrmd160,coinaddr); bitcoin_address("HUSH",checkaddr,28,checktype == 60 ? 184 : 189,checkrmd160,20); - if ( memcmp(rmd160,checkrmd160,20) != 0 || strcmp(coinaddr,checkaddr) != 0 ) + if ( memcmp(rmd160,checkrmd160,20) != 0 || strcmp(buf,checkaddr) != 0 ) { for (i=0; i<20; i++) printf("%02x",rmd160[i]); printf(" vs. "); for (i=0; i<20; i++) printf("%02x",checkrmd160[i]); - printf(" address calc error (%s) -> (%s) -> (%s) %d %d?\n",buf,coinaddr,checkaddr,memcmp(rmd160,checkrmd160,20),strcmp(coinaddr,checkaddr)); + printf(" address calc error (%s) -> (%s) -> (%s) %d %d?\n",buf,coinaddr,checkaddr,memcmp(rmd160,checkrmd160,20),strcmp(buf,checkaddr)); } else { From 82d0593b19f2ac05dac918d86ab28bff3d108d57 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 19:24:19 +0200 Subject: [PATCH 11/34] Test --- iguana/exchanges/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index c0b964fdb..5307a7db1 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -222,7 +222,7 @@ int main(int argc, const char * argv[]) printf(" vs. "); for (i=0; i<20; i++) printf("%02x",checkrmd160[i]); - printf(" address calc error (%s) -> (%s) -> (%s) %d %d?\n",buf,coinaddr,checkaddr,memcmp(rmd160,checkrmd160,20),strcmp(buf,checkaddr)); + printf(" address calc error (%s) -> (%s) -> (%s) %.8f?\n",buf,coinaddr,checkaddr,atof(flag)); } else { From 162f0f7acc1d2a70e6590ff2b26fc01e224a31ce Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 19:25:05 +0200 Subject: [PATCH 12/34] Test --- iguana/exchanges/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index 5307a7db1..4c125ce25 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -222,7 +222,7 @@ int main(int argc, const char * argv[]) printf(" vs. "); for (i=0; i<20; i++) printf("%02x",checkrmd160[i]); - printf(" address calc error (%s) -> (%s) -> (%s) %.8f?\n",buf,coinaddr,checkaddr,atof(flag)); + printf(" address calc error (%s).%d -> (%s).%d -> (%s) %.8f?\n",buf,addrtype,coinaddr,checktype,checkaddr,atof(flag)); } else { From e79d025925b6f72488a1e93f304681f8afeb54ea Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 19:38:44 +0200 Subject: [PATCH 13/34] Test --- iguana/exchanges/mm.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index 4c125ce25..718e978e7 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -192,9 +192,10 @@ int main(int argc, const char * argv[]) } else if ( argv[1] != 0 && strcmp(argv[1],"airdropH") == 0 && argv[2] != 0 ) { - FILE *fp; double val,total = 0.; uint8_t checktype,addrtype,rmd160[21],checkrmd160[21]; char buf[256],checkaddr[64],coinaddr[64]; int32_t n,i; char *flag; + FILE *fp; double val,total = 0.; uint8_t checktype,addrtype,rmd160[21],checkrmd160[21]; char buf[256],checkaddr[64],coinaddr[64],manystrs[64][128],cmd[64*128]; int32_t n,i,num; char *flag; if ( (fp= fopen(argv[2],"rb")) != 0 ) { + num = 0; while ( fgets(buf,sizeof(buf),fp) > 0 ) { if ( (n= (int32_t)strlen(buf)) > 0 ) @@ -227,12 +228,33 @@ int main(int argc, const char * argv[]) else { val = atof(flag); + sprintf(manystrs[num++],"\\\"%s\\\":%0.8f",coinaddr,val); + if ( num >= sizeof(manystrs)/sizeof(*manystrs) ) + { + sprintf(cmd,"fiat/btch sendmany \"\" \"{ "); + for (i=0; i 0 ) + { + sprintf(cmd,"fiat/btch sendmany \"\" \"{ "); + for (i=0; i Date: Fri, 2 Feb 2018 20:34:30 +0200 Subject: [PATCH 14/34] Test --- iguana/exchanges/mm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index 718e978e7..db5163efd 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -231,10 +231,10 @@ int main(int argc, const char * argv[]) sprintf(manystrs[num++],"\\\"%s\\\":%0.8f",coinaddr,val); if ( num >= sizeof(manystrs)/sizeof(*manystrs) ) { - sprintf(cmd,"fiat/btch sendmany \"\" \"{ "); + sprintf(cmd,"fiat/btch sendmany \"\" \"{"); for (i=0; i 0 ) { - sprintf(cmd,"fiat/btch sendmany \"\" \"{ "); + sprintf(cmd,"fiat/btch sendmany \"\" \"{"); for (i=0; i Date: Fri, 2 Feb 2018 21:04:43 +0200 Subject: [PATCH 15/34] Test --- iguana/exchanges/mm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index db5163efd..73d9e33b2 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -231,10 +231,10 @@ int main(int argc, const char * argv[]) sprintf(manystrs[num++],"\\\"%s\\\":%0.8f",coinaddr,val); if ( num >= sizeof(manystrs)/sizeof(*manystrs) ) { - sprintf(cmd,"fiat/btch sendmany \"\" \"{"); + sprintf(cmd,"fiat/btch sendmany \\\"\\\" \"{"); for (i=0; i 0 ) { - sprintf(cmd,"fiat/btch sendmany \"\" \"{"); + sprintf(cmd,"fiat/btch sendmany \\\"\\\" \"{"); for (i=0; i Date: Fri, 2 Feb 2018 21:47:49 +0200 Subject: [PATCH 16/34] Test --- crypto777/inet.c | 5 ++++- iguana/exchanges/LP_coins.c | 2 +- iguana/exchanges/beertest | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100755 iguana/exchanges/beertest diff --git a/crypto777/inet.c b/crypto777/inet.c index 0809b96c6..6d3555e89 100755 --- a/crypto777/inet.c +++ b/crypto777/inet.c @@ -605,7 +605,10 @@ uint16_t parse_endpoint(int32_t *ip6flagp,char *transport,char *ipbuf,char *retb ipbits = calc_ipbits(ipaddr); expand_ipbits(tmp,ipbits); if ( strcmp(tmp,ipaddr) != 0 ) - ipaddr = 0, sprintf(retbuf,"{\"result\":\"illegal ipaddr\",\"endpoint\":\"%s\",\"ipaddr\":\"%s\",\"checkaddr\":\"%s\"}",endpoint,ipaddr,tmp); + { + sprintf(retbuf,"{\"result\":\"illegal ipaddr\",\"endpoint\":\"%s\",\"ipaddr\":\"%s\",\"checkaddr\":\"%s\"}",endpoint,ipaddr,tmp); + ipaddr = 0; + } } if ( inet != 0 && ipaddr != 0 && port != 0 ) { diff --git a/iguana/exchanges/LP_coins.c b/iguana/exchanges/LP_coins.c index 4134936bf..89483dd1e 100644 --- a/iguana/exchanges/LP_coins.c +++ b/iguana/exchanges/LP_coins.c @@ -214,7 +214,7 @@ uint16_t LP_userpass(char *userpass,char *symbol,char *assetname,char *confroot, cJSON *LP_coinjson(struct iguana_info *coin,int32_t showwif) { - struct electrum_info *ep; bits256 zero; int32_t notarized; uint64_t balance; char wifstr[128],ipaddr[64]; uint8_t tmptype; bits256 checkkey; cJSON *item = cJSON_CreateObject(); + struct electrum_info *ep; bits256 zero; int32_t notarized; uint64_t balance; char wifstr[128],ipaddr[72]; uint8_t tmptype; bits256 checkkey; cJSON *item = cJSON_CreateObject(); jaddstr(item,"coin",coin->symbol); if ( showwif != 0 ) { diff --git a/iguana/exchanges/beertest b/iguana/exchanges/beertest new file mode 100755 index 000000000..ca0846fd6 --- /dev/null +++ b/iguana/exchanges/beertest @@ -0,0 +1,2 @@ +source userpass +curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BEER\",\"rel\":\"KMD\",\"fixed\":0.777,\"margin\":0.00001}" From e75db057b314b81bfb4339dc17dfd094e70a392e Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 22:21:37 +0200 Subject: [PATCH 17/34] Test --- iguana/exchanges/beertest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/beertest b/iguana/exchanges/beertest index ca0846fd6..7549f84a4 100755 --- a/iguana/exchanges/beertest +++ b/iguana/exchanges/beertest @@ -1,2 +1,2 @@ source userpass -curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BEER\",\"rel\":\"KMD\",\"fixed\":0.777,\"margin\":0.00001}" +curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BEER\",\"rel\":\"KMD\",\"fixed\":1.28700127,\"margin\":0.00001}" From 30c0b62f83a923be05c333e55ba371d1894b26e8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 22:27:49 +0200 Subject: [PATCH 18/34] Test --- iguana/exchanges/beertest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/beertest b/iguana/exchanges/beertest index 7549f84a4..b69312011 100755 --- a/iguana/exchanges/beertest +++ b/iguana/exchanges/beertest @@ -1,2 +1,2 @@ source userpass -curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BEER\",\"rel\":\"KMD\",\"fixed\":1.28700127,\"margin\":0.00001}" +curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BEER\",\"rel\":\"KMD\",\"fixed\":0.77699,\"margin\":0.00001}" From 2b8f3d81058956fb0fd1d51c33f1e3a25c5caa09 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 2 Feb 2018 22:33:01 +0200 Subject: [PATCH 19/34] Test --- iguana/exchanges/beertest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/beertest b/iguana/exchanges/beertest index b69312011..61b600820 100755 --- a/iguana/exchanges/beertest +++ b/iguana/exchanges/beertest @@ -1,2 +1,2 @@ source userpass -curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BEER\",\"rel\":\"KMD\",\"fixed\":0.77699,\"margin\":0.00001}" +curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BEER\",\"rel\":\"KMD\",\"fixed\":1.28700,\"margin\":0.00001}" From 9324620ec7da221a40bac909f063903770227766 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 14:38:28 +0200 Subject: [PATCH 20/34] Test --- iguana/exchanges/LP_nativeDEX.c | 2 +- iguana/exchanges/LP_ordermatch.c | 35 +++++++++++++++++++------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 1fe39f0b9..4f936d123 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1111,7 +1111,7 @@ void LP_reserved_msgs(void *ignore) if ( num_Reserved_msgs[1] > 0 ) { num_Reserved_msgs[1]--; -//printf("PRIORITY BROADCAST.(%s)\n",Reserved_msgs[1][num_Reserved_msgs[1]]); +printf("PRIORITY BROADCAST.(%s)\n",Reserved_msgs[1][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; } diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 3ec680e96..7c615ba55 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -1029,21 +1029,26 @@ void LP_tradesloop(void *ctx) HASH_FIND(hh,LP_trades,&qtp->aliceid,sizeof(qtp->aliceid),tp); if ( tp == 0 ) { - tp = qtp; - HASH_ADD(hh,LP_trades,aliceid,sizeof(tp->aliceid),tp); - portable_mutex_unlock(&LP_tradesmutex); - if ( tp->iambob != 0 && funcid == LP_REQUEST ) // bob maybe sends LP_RESERVED - { - if ( (qp= LP_trades_gotrequest(ctx,&Q,&tp->Qs[LP_REQUEST],tp->pairstr)) != 0 ) - tp->Qs[LP_RESERVED] = Q; - } - else if ( tp->iambob == 0 && funcid == LP_RESERVED ) // alice maybe sends LP_CONNECT + if ( now > Q.timestamp+LP_AUTOTRADE_TIMEOUT*20 ) // eat expired + free(qtp); + else { - LP_trades_bestpricecheck(ctx,tp); + tp = qtp; + HASH_ADD(hh,LP_trades,aliceid,sizeof(tp->aliceid),tp); + portable_mutex_unlock(&LP_tradesmutex); + if ( tp->iambob != 0 && funcid == LP_REQUEST ) // bob maybe sends LP_RESERVED + { + if ( (qp= LP_trades_gotrequest(ctx,&Q,&tp->Qs[LP_REQUEST],tp->pairstr)) != 0 ) + tp->Qs[LP_RESERVED] = Q; + } + else if ( tp->iambob == 0 && funcid == LP_RESERVED ) // alice maybe sends LP_CONNECT + { + LP_trades_bestpricecheck(ctx,tp); + } + nonz++; + tp->firstprocessed = tp->lastprocessed = (uint32_t)time(NULL); + //printf("iambob.%d funcid.%d vs %d\n",tp->iambob,funcid,LP_REQUEST); } - nonz++; - tp->firstprocessed = tp->lastprocessed = (uint32_t)time(NULL); -//printf("iambob.%d funcid.%d vs %d\n",tp->iambob,funcid,LP_REQUEST); continue; } portable_mutex_unlock(&LP_tradesmutex); @@ -1120,7 +1125,7 @@ void LP_tradesloop(void *ctx) } } } - else if ( now > tp->firstprocessed+timeout*10 ) + if ( now > tp->firstprocessed+timeout*10 ) { //printf("purge swap aliceid.%llu\n",(long long)tp->aliceid); portable_mutex_lock(&LP_tradesmutex); @@ -1165,6 +1170,8 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, if ( (method= jstr(argjson,"method")) != 0 && (strcmp(method,"reserved") == 0 ||strcmp(method,"connected") == 0 || strcmp(method,"request") == 0 || strcmp(method,"connect") == 0) ) { LP_quoteparse(&Q,argjson); + if ( time(NULL) > Q.timestamp + LP_AUTOTRADE_TIMEOUT*20 ) // eat expired packets + return(1); LP_requestinit(&Q.R,Q.srchash,Q.desthash,Q.srccoin,Q.satoshis-Q.txfee,Q.destcoin,Q.destsatoshis-Q.desttxfee,Q.timestamp,Q.quotetime,DEXselector); LP_tradecommand_log(argjson); printf("%-4d (%-10u %10u) %12s id.%-20llu %5s/%-5s %12.8f -> %12.8f (%11.8f) | RT.%d %d n%d\n",(uint32_t)time(NULL) % 3600,Q.R.requestid,Q.R.quoteid,method,(long long)Q.aliceid,Q.srccoin,Q.destcoin,dstr(Q.satoshis),dstr(Q.destsatoshis),(double)Q.destsatoshis/Q.satoshis,LP_RTcount,LP_swapscount,G.netid); From c26546a62fce02cc4bd02e76ab37a23415fd3b29 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 14:55:46 +0200 Subject: [PATCH 21/34] Test --- iguana/exchanges/LP_nativeDEX.c | 2 +- iguana/exchanges/LP_signatures.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 4f936d123..1fe39f0b9 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1111,7 +1111,7 @@ void LP_reserved_msgs(void *ignore) if ( num_Reserved_msgs[1] > 0 ) { num_Reserved_msgs[1]--; -printf("PRIORITY BROADCAST.(%s)\n",Reserved_msgs[1][num_Reserved_msgs[1]]); +//printf("PRIORITY BROADCAST.(%s)\n",Reserved_msgs[1][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; } diff --git a/iguana/exchanges/LP_signatures.c b/iguana/exchanges/LP_signatures.c index 00c92a8d8..b2b70136d 100644 --- a/iguana/exchanges/LP_signatures.c +++ b/iguana/exchanges/LP_signatures.c @@ -677,12 +677,12 @@ void LP_query(void *ctx,char *myipaddr,int32_t mypubsock,char *method,struct LP_ memset(&zero,0,sizeof(zero)); LP_reserved_msg(1,qp->srccoin,qp->destcoin,zero,clonestr(msg)); //if ( strcmp(method,"request") == 0 ) - if ( 0 ) + if ( 1 ) { sleep(1); LP_reserved_msg(1,qp->srccoin,qp->destcoin,zero,clonestr(msg)); sleep(1); - LP_reserved_msg(1,qp->srccoin,qp->destcoin,zero,clonestr(msg)); + LP_reserved_msg(1,qp->srccoin,qp->destcoin,qp->desthash,clonestr(msg)); } free(msg); /*portable_mutex_lock(&LP_reservedmutex); From 47265477ec36fb11e7b6e144520a6ae35ca95c87 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 15:16:09 +0200 Subject: [PATCH 22/34] Test --- iguana/exchanges/LP_signatures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_signatures.c b/iguana/exchanges/LP_signatures.c index b2b70136d..8382120f7 100644 --- a/iguana/exchanges/LP_signatures.c +++ b/iguana/exchanges/LP_signatures.c @@ -677,7 +677,7 @@ void LP_query(void *ctx,char *myipaddr,int32_t mypubsock,char *method,struct LP_ memset(&zero,0,sizeof(zero)); LP_reserved_msg(1,qp->srccoin,qp->destcoin,zero,clonestr(msg)); //if ( strcmp(method,"request") == 0 ) - if ( 1 ) + if ( 0 ) { sleep(1); LP_reserved_msg(1,qp->srccoin,qp->destcoin,zero,clonestr(msg)); From 689d99f197dc7ce98f1a864b6f0708b72aef49c6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 15:32:54 +0200 Subject: [PATCH 23/34] Test --- iguana/exchanges/LP_nativeDEX.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 1fe39f0b9..2c130a27f 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -891,7 +891,8 @@ void LP_initpeers(int32_t pubsock,struct LP_peerinfo *mypeer,char *myipaddr,uint { printf("default seed nodes for netid.%d\n",netid); OS_randombytes((void *)&r,sizeof(r)); - for (j=0; j Date: Sat, 3 Feb 2018 15:45:27 +0200 Subject: [PATCH 24/34] Test --- iguana/exchanges/LP_ordermatch.c | 7 +++++-- iguana/exchanges/LP_stats.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 7c615ba55..ebeb9a9c2 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -1170,11 +1170,14 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, if ( (method= jstr(argjson,"method")) != 0 && (strcmp(method,"reserved") == 0 ||strcmp(method,"connected") == 0 || strcmp(method,"request") == 0 || strcmp(method,"connect") == 0) ) { LP_quoteparse(&Q,argjson); - if ( time(NULL) > Q.timestamp + LP_AUTOTRADE_TIMEOUT*20 ) // eat expired packets - return(1); LP_requestinit(&Q.R,Q.srchash,Q.desthash,Q.srccoin,Q.satoshis-Q.txfee,Q.destcoin,Q.destsatoshis-Q.desttxfee,Q.timestamp,Q.quotetime,DEXselector); LP_tradecommand_log(argjson); printf("%-4d (%-10u %10u) %12s id.%-20llu %5s/%-5s %12.8f -> %12.8f (%11.8f) | RT.%d %d n%d\n",(uint32_t)time(NULL) % 3600,Q.R.requestid,Q.R.quoteid,method,(long long)Q.aliceid,Q.srccoin,Q.destcoin,dstr(Q.satoshis),dstr(Q.destsatoshis),(double)Q.destsatoshis/Q.satoshis,LP_RTcount,LP_swapscount,G.netid); + if ( time(NULL) > Q.timestamp + LP_AUTOTRADE_TIMEOUT*20 ) // eat expired packets + { + printf("aliceid.%llu is expired\n",(long long)Q.aliceid); + return(1); + } //LP_autoprices_update(method,Q.srccoin,dstr(Q.satoshis),Q.destcoin,dstr(Q.destsatoshis)); retval = 1; aliceid = j64bits(argjson,"aliceid"); diff --git a/iguana/exchanges/LP_stats.c b/iguana/exchanges/LP_stats.c index 1bce64fde..721a8c2ab 100644 --- a/iguana/exchanges/LP_stats.c +++ b/iguana/exchanges/LP_stats.c @@ -471,7 +471,7 @@ int32_t LP_statslog_parsequote(char *method,cJSON *lineobj) flag = 1; break; } - if ( counter++ < 10 ) + if ( counter++ < 1 ) printf("error after delayed match\n"); } } From dc018e223913e8e7a4d56f2c19789aacb4e52d05 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 15:48:16 +0200 Subject: [PATCH 25/34] Test --- iguana/exchanges/LP_ordermatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index ebeb9a9c2..6118eaff2 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -1173,9 +1173,9 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, LP_requestinit(&Q.R,Q.srchash,Q.desthash,Q.srccoin,Q.satoshis-Q.txfee,Q.destcoin,Q.destsatoshis-Q.desttxfee,Q.timestamp,Q.quotetime,DEXselector); LP_tradecommand_log(argjson); printf("%-4d (%-10u %10u) %12s id.%-20llu %5s/%-5s %12.8f -> %12.8f (%11.8f) | RT.%d %d n%d\n",(uint32_t)time(NULL) % 3600,Q.R.requestid,Q.R.quoteid,method,(long long)Q.aliceid,Q.srccoin,Q.destcoin,dstr(Q.satoshis),dstr(Q.destsatoshis),(double)Q.destsatoshis/Q.satoshis,LP_RTcount,LP_swapscount,G.netid); - if ( time(NULL) > Q.timestamp + LP_AUTOTRADE_TIMEOUT*20 ) // eat expired packets + if ( Q.timestamp > 0 && time(NULL) > Q.timestamp + LP_AUTOTRADE_TIMEOUT*20 ) // eat expired packets { - printf("aliceid.%llu is expired\n",(long long)Q.aliceid); + printf("aliceid.%llu is expired by %d\n",(long long)Q.aliceid,(uint32_t)time(NULL) - (Q.timestamp + LP_AUTOTRADE_TIMEOUT*20)); return(1); } //LP_autoprices_update(method,Q.srccoin,dstr(Q.satoshis),Q.destcoin,dstr(Q.destsatoshis)); From 46f15ccf35dc3ea1f5bd584904c8d18d710a1b8f Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 15:51:00 +0200 Subject: [PATCH 26/34] Test --- iguana/exchanges/LP_ordermatch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 6118eaff2..b5ad6c7d2 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -1029,7 +1029,7 @@ void LP_tradesloop(void *ctx) HASH_FIND(hh,LP_trades,&qtp->aliceid,sizeof(qtp->aliceid),tp); if ( tp == 0 ) { - if ( now > Q.timestamp+LP_AUTOTRADE_TIMEOUT*20 ) // eat expired + if ( 0 && now > Q.timestamp+LP_AUTOTRADE_TIMEOUT*20 ) // eat expired free(qtp); else { @@ -1175,8 +1175,8 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, printf("%-4d (%-10u %10u) %12s id.%-20llu %5s/%-5s %12.8f -> %12.8f (%11.8f) | RT.%d %d n%d\n",(uint32_t)time(NULL) % 3600,Q.R.requestid,Q.R.quoteid,method,(long long)Q.aliceid,Q.srccoin,Q.destcoin,dstr(Q.satoshis),dstr(Q.destsatoshis),(double)Q.destsatoshis/Q.satoshis,LP_RTcount,LP_swapscount,G.netid); if ( Q.timestamp > 0 && time(NULL) > Q.timestamp + LP_AUTOTRADE_TIMEOUT*20 ) // eat expired packets { - printf("aliceid.%llu is expired by %d\n",(long long)Q.aliceid,(uint32_t)time(NULL) - (Q.timestamp + LP_AUTOTRADE_TIMEOUT*20)); - return(1); + //printf("aliceid.%llu is expired by %d\n",(long long)Q.aliceid,(uint32_t)time(NULL) - (Q.timestamp + LP_AUTOTRADE_TIMEOUT*20)); + //return(1); } //LP_autoprices_update(method,Q.srccoin,dstr(Q.satoshis),Q.destcoin,dstr(Q.destsatoshis)); retval = 1; From aece25c139e40e98b3c3a5247c8e77b082398d08 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 19:31:01 +0200 Subject: [PATCH 27/34] Test --- iguana/exchanges/LP_nativeDEX.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 2c130a27f..91e65a571 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1097,8 +1097,8 @@ void LP_reserved_msgs(void *ignore) if ( num_Reserved_msgs[0] > 0 || num_Reserved_msgs[1] > 0 ) { nonz++; - flag = 0; - if ( LP_mypubsock >= 0 ) + flag = 1; + if ( flag == 0 && LP_mypubsock >= 0 ) { memset(&pfd,0,sizeof(pfd)); pfd.fd = LP_mypubsock; @@ -1128,9 +1128,8 @@ void LP_reserved_msgs(void *ignore) } if ( ignore == 0 ) break; - if ( nonz != 0 ) - usleep(1000); - else usleep(5000); + if ( nonz == 0 ) + usleep(5000); } } @@ -1148,7 +1147,7 @@ int32_t LP_reserved_msg(int32_t priority,char *base,char *rel,bits256 pubkey,cha if ( num_Reserved_msgs[priority] > max_Reserved_msgs[priority] ) { max_Reserved_msgs[priority] = num_Reserved_msgs[priority]; - if ( (max_Reserved_msgs[priority] % 100) == 0 ) + //if ( (max_Reserved_msgs[priority] % 100) == 0 ) printf("New priority.%d max_Reserved_msgs.%d\n",priority,max_Reserved_msgs[priority]); } portable_mutex_unlock(&LP_reservedmutex); From 9e1164f8a38e1b0697b512b25dd9139f59acc7bd Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 19:37:58 +0200 Subject: [PATCH 28/34] Test --- iguana/exchanges/LP_ordermatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index b5ad6c7d2..29e5a0a21 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -864,7 +864,7 @@ struct LP_quoteinfo *LP_trades_gotrequest(void *ctx,struct LP_quoteinfo *qp,stru price = myprice + (r * range) / 100.; bestprice = LP_bob_competition(&counter,qp->aliceid,price,0); printf("%llu >>>>>>> qprice %.8f r.%d range %.8f -> %.8f, bestprice %.8f counter.%d\n",(long long)qp->aliceid,qprice,r,range,price,bestprice,counter); - if ( counter > 3 && price >= bestprice+SMALLVAL ) // skip if late or bad price + if ( counter > 3 && price > bestprice+SMALLVAL ) // skip if late or bad price return(0); } else return(0); //LP_RTmetrics_update(qp->srccoin,qp->destcoin); @@ -1258,7 +1258,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, printf("CONNECT.(%s)\n",jprint(argjson,0)); if ( (proof= jarray(&num,argjson,"proof")) != 0 && num > 0 ) Q.othercredits = LP_instantdex_proofcheck(Q.destcoin,Q.destaddr,proof,num); - if ( Qtrades == 0 ) + if ( 1 || Qtrades == 0 ) LP_trades_gotconnect(ctx,&Q,&Q2,jstr(argjson,"pair")); else LP_tradecommandQ(&Q,jstr(argjson,"pair"),LP_CONNECT); } From 5c31b6c39b222c8e85663c963dc5f7365cfd796a Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 19:45:58 +0200 Subject: [PATCH 29/34] Test --- iguana/exchanges/LP_nativeDEX.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 91e65a571..e5a9c3fe7 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1097,7 +1097,7 @@ void LP_reserved_msgs(void *ignore) if ( num_Reserved_msgs[0] > 0 || num_Reserved_msgs[1] > 0 ) { nonz++; - flag = 1; + flag = 0; if ( flag == 0 && LP_mypubsock >= 0 ) { memset(&pfd,0,sizeof(pfd)); From 5744bbf6b8530d7eba81849e62889b54b90744d7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 20:23:47 +0200 Subject: [PATCH 30/34] Test --- iguana/exchanges/LP_instantdex.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_instantdex.c b/iguana/exchanges/LP_instantdex.c index e10f991ea..4dd519de7 100644 --- a/iguana/exchanges/LP_instantdex.c +++ b/iguana/exchanges/LP_instantdex.c @@ -597,11 +597,14 @@ cJSON *LP_swapstats_item(struct LP_swapstats *sp,int32_t iambob) } if ( flag != 0 ) { - reqjson = cJSON_CreateObject(); - jaddstr(reqjson,"method","gettradestatus"); - jadd64bits(reqjson,"aliceid",sp->aliceid); - memset(zero.bytes,0,sizeof(zero)); - LP_reserved_msg(0,"","",zero,jprint(reqjson,1)); + if ( 0 ) + { + reqjson = cJSON_CreateObject(); + jaddstr(reqjson,"method","gettradestatus"); + jadd64bits(reqjson,"aliceid",sp->aliceid); + memset(zero.bytes,0,sizeof(zero)); + LP_reserved_msg(0,"","",zero,jprint(reqjson,1)); + } if ( (swapstr= basilisk_swapentry(sp->Q.R.requestid,sp->Q.R.quoteid,0)) != 0 ) { if ( (swapjson= cJSON_Parse(swapstr)) != 0 ) From 9c9f2766b90e2bfb8dfebbbfd669e490a62fd13d Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 20:26:47 +0200 Subject: [PATCH 31/34] Test --- iguana/exchanges/LP_commands.c | 5 ++++- iguana/exchanges/LP_nativeDEX.c | 33 ++++++++++++++++++--------------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index 94186c659..290844812 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -643,7 +643,10 @@ jpg(srcfile, destfile, power2=7, password, data="", required, ind=0)\n\ if ( strcmp(method,"swapstatus") == 0 ) return(LP_swapstatus_recv(argjson)); else if ( strcmp(method,"gettradestatus") == 0 ) - return(LP_gettradestatus(j64bits(argjson,"aliceid"),juint(argjson,"requestid"),juint(argjson,"quoteid"))); + { + retstr = clonestr("{\"error\":\"deprecated\"}"); + //return(LP_gettradestatus(j64bits(argjson,"aliceid"),juint(argjson,"requestid"),juint(argjson,"quoteid"))); + } else if ( strcmp(method,"postprice") == 0 ) return(LP_postprice_recv(argjson)); else if ( strcmp(method,"uitem") == 0 ) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index e5a9c3fe7..840be075e 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -1094,7 +1094,20 @@ void LP_reserved_msgs(void *ignore) { nonz = 0; LP_millistats_update(&LP_reserved_msgs_stats); - if ( num_Reserved_msgs[0] > 0 || num_Reserved_msgs[1] > 0 ) + if ( num_Reserved_msgs[1] > 0 ) + { + nonz++; + portable_mutex_lock(&LP_reservedmutex); + if ( num_Reserved_msgs[1] > 0 ) + { + num_Reserved_msgs[1]--; + //printf("PRIORITY BROADCAST.(%s)\n",Reserved_msgs[1][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; + } + portable_mutex_unlock(&LP_reservedmutex); + } + else if ( num_Reserved_msgs[0] > 0 ) { nonz++; flag = 0; @@ -1109,20 +1122,10 @@ void LP_reserved_msgs(void *ignore) if ( flag == 1 ) { portable_mutex_lock(&LP_reservedmutex); - if ( num_Reserved_msgs[1] > 0 ) - { - num_Reserved_msgs[1]--; -//printf("PRIORITY BROADCAST.(%s)\n",Reserved_msgs[1][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]--; -//printf("BROADCAST.(%s)\n",Reserved_msgs[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; - } + num_Reserved_msgs[0]--; + //printf("BROADCAST.(%s)\n",Reserved_msgs[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); } } From 629af10dccea94a17691dd33e36b8200b1a50101 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 20:28:08 +0200 Subject: [PATCH 32/34] Test --- iguana/exchanges/LP_include.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_include.h b/iguana/exchanges/LP_include.h index 96a94c08d..6a0e94db3 100644 --- a/iguana/exchanges/LP_include.h +++ b/iguana/exchanges/LP_include.h @@ -55,7 +55,7 @@ void emscripten_usleep(int32_t x); // returns immediate, no sense for sleeping #define LP_MAXVINS 64 #define LP_HTTP_TIMEOUT 3 // 1 is too small due to edge cases of time(NULL) -#define LP_AUTOTRADE_TIMEOUT 30 +#define LP_AUTOTRADE_TIMEOUT 60 #define LP_RESERVETIME 600 //(LP_AUTOTRADE_TIMEOUT * 2) #define ELECTRUM_TIMEOUT 13 #define LP_ELECTRUM_KEEPALIVE 60 From 4b0da668183d361c97cb39237b843d79d85bc321 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 20:36:53 +0200 Subject: [PATCH 33/34] Test --- iguana/exchanges/LP_ordermatch.c | 2 +- iguana/exchanges/LP_signatures.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 29e5a0a21..c322b911e 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -1220,7 +1220,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, //printf("CONNECTED.(%s)\n",jprint(argjson,0)); if ( (proof= jarray(&num,argjson,"proof")) != 0 && num > 0 ) Q.othercredits = LP_instantdex_proofcheck(Q.srccoin,Q.coinaddr,proof,num); - if ( Qtrades == 0 ) + if ( 1 || Qtrades == 0 ) LP_trades_gotconnected(ctx,&Q,&Q2,jstr(argjson,"pair")); else LP_tradecommandQ(&Q,jstr(argjson,"pair"),LP_CONNECTED); } diff --git a/iguana/exchanges/LP_signatures.c b/iguana/exchanges/LP_signatures.c index 8382120f7..4ac5a051b 100644 --- a/iguana/exchanges/LP_signatures.c +++ b/iguana/exchanges/LP_signatures.c @@ -676,13 +676,12 @@ void LP_query(void *ctx,char *myipaddr,int32_t mypubsock,char *method,struct LP_ { memset(&zero,0,sizeof(zero)); LP_reserved_msg(1,qp->srccoin,qp->destcoin,zero,clonestr(msg)); - //if ( strcmp(method,"request") == 0 ) - if ( 0 ) + if ( strcmp(method,"connect") == 0 ) { sleep(1); LP_reserved_msg(1,qp->srccoin,qp->destcoin,zero,clonestr(msg)); sleep(1); - LP_reserved_msg(1,qp->srccoin,qp->destcoin,qp->desthash,clonestr(msg)); + LP_reserved_msg(0,qp->srccoin,qp->destcoin,zero,clonestr(msg)); } free(msg); /*portable_mutex_lock(&LP_reservedmutex); From c12f23be3b45891e5288ee3aaf65a0a2be6798b3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Feb 2018 20:55:16 +0200 Subject: [PATCH 34/34] Test --- iguana/exchanges/LP_include.h | 1 + iguana/exchanges/LP_transaction.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/iguana/exchanges/LP_include.h b/iguana/exchanges/LP_include.h index 6a0e94db3..ed797f3ba 100644 --- a/iguana/exchanges/LP_include.h +++ b/iguana/exchanges/LP_include.h @@ -52,6 +52,7 @@ void emscripten_usleep(int32_t x); // returns immediate, no sense for sleeping #endif //#define LP_STRICTPEERS +#define LP_DISABLE_DISTCOMBINE #define LP_MAXVINS 64 #define LP_HTTP_TIMEOUT 3 // 1 is too small due to edge cases of time(NULL) diff --git a/iguana/exchanges/LP_transaction.c b/iguana/exchanges/LP_transaction.c index 5ea9509f2..6840a900f 100644 --- a/iguana/exchanges/LP_transaction.c +++ b/iguana/exchanges/LP_transaction.c @@ -1211,6 +1211,9 @@ char *LP_createrawtransaction(cJSON **txobjp,int32_t *numvinsp,struct iguana_inf else if ( coin->numutxos >= LP_MAXDESIRED_UTXOS ) dustcombine = 2; else dustcombine = 1; +#ifdef LP_DISABLE_DISTCOMBINE + dustcombine = 0; +#endif amount = txfee; for (i=0; i