From 2e44147953950f9f3f1020d29fc54341e31d2785 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 6 Mar 2018 21:33:12 +0200 Subject: [PATCH 1/3] Test --- iguana/iguana777.c | 3 +++ iguana/iguana_interpreter.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index d998b4b81..9d7bd35ed 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -1216,12 +1216,15 @@ int32_t iguana_launchcoin(struct supernet_info *myinfo,char *symbol,cJSON *json, return(0); } +void iguana_optableinit(); + void iguana_coins(void *arg) { struct iguana_info **coins,*coin; char *jsonstr,*symbol; cJSON *array,*item,*json; int32_t i,n,maxpeers,maphash,initialheight,minconfirms,maxrequests,maxbundles; int64_t maxrecvcache; uint64_t services; struct vin_info V; struct supernet_info *myinfo; myinfo = SuperNET_MYINFO(0); + iguana_optableinit(); memset(&V,0,sizeof(V)); if ( (jsonstr= arg) != 0 && (json= cJSON_Parse(jsonstr)) != 0 ) { diff --git a/iguana/iguana_interpreter.c b/iguana/iguana_interpreter.c index d979752f6..75d559d57 100755 --- a/iguana/iguana_interpreter.c +++ b/iguana/iguana_interpreter.c @@ -881,7 +881,7 @@ int32_t iguana_checksequenceverify(struct iguana_info *coin,int64_t nLockTime,ui return(0); } -void iguana_optableinit(struct iguana_info *coin) +void iguana_optableinit() { int32_t i,extralen; uint8_t stackitems,flags; char *opname; struct bitcoin_opcode *op; if ( OPTABLE == 0 ) @@ -912,7 +912,7 @@ void iguana_optableinit(struct iguana_info *coin) int32_t iguana_expandscript(struct iguana_info *coin,char *asmstr,int32_t maxlen,uint8_t *script,int32_t scriptlen) { int32_t len,n,j,i = 0; uint8_t opcode; uint32_t val,extraflag; - iguana_optableinit(coin); + iguana_optableinit(); asmstr[0] = len = 0; while ( i < scriptlen ) { @@ -1001,7 +1001,7 @@ int32_t bitcoin_assembler(struct iguana_info *coin,cJSON *logarray,uint8_t scrip struct iguana_stackdata args[MAX_PUBKEYS_PER_MULTISIG]; uint8_t databuf[MAX_SCRIPT_ELEMENT_SIZE]; char *asmstr,*str,*hexstr; cJSON *item; int32_t c,numops,dlen,plen,numvars,numused,numargs=0,i,j,k,n=0,len,datalen,errs=0; int64_t val; - iguana_optableinit(coin); + iguana_optableinit(); if ( (asmstr= jstr(interpreter,"interpreter")) == 0 || asmstr[0] == 0 ) return(0); if ( (numvars= juint(interpreter,"numvars")) > 0 ) From 81b46c087e8483fed26f7bfc417f199f1d27b353 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 6 Mar 2018 21:44:51 +0200 Subject: [PATCH 2/3] 256 utxo for KMD --- iguana/dpow/dpow_fsm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index ebea1f767..2f5a0b4fc 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -129,6 +129,11 @@ int32_t dpow_checkutxo(struct supernet_info *myinfo,struct dpow_info *dp,struct minutxo = 199; n = 10; } + else if ( strcmp("KMD",coin->symbol) == 0 ) + { + minutxo = 512; + n = 256; + } else { minutxo = 49; From 174cfa6d42c045296a774b2d5316966cc9d34156 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Mar 2018 11:44:21 +0200 Subject: [PATCH 3/3] Define NN_WS_MSG_TYPE --- iguana/exchanges/mm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iguana/exchanges/mm.c b/iguana/exchanges/mm.c index e3ba84c30..2ee04b87e 100644 --- a/iguana/exchanges/mm.c +++ b/iguana/exchanges/mm.c @@ -71,6 +71,9 @@ void LP_priceupdate(char *base,char *rel,double price,double avebid,double aveas #include "/usr/local/include/nanomsg/ws.h" #endif #endif +#ifndef NN_WS_MSG_TYPE +#define NN_WS_MSG_TYPE 1 +#endif #include "LP_nativeDEX.c"