From 9e8cfd58a93b24ef20ad4ed00bbffef6f04465cc Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 24 Oct 2017 13:24:02 +0300 Subject: [PATCH 1/3] Undefine cJSON bools --- src/cJSON.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cJSON.c b/src/cJSON.c index 5b58f2ffc..b67ca698d 100644 --- a/src/cJSON.c +++ b/src/cJSON.c @@ -43,8 +43,8 @@ #include "cJSON.h" /* define our own boolean type */ -#define true ((cJSON_bool)1) -#define false ((cJSON_bool)0) +//#define true ((cJSON_bool)1) +//#define false ((cJSON_bool)0) typedef struct { const unsigned char *json; From 2c1ea2350a6905f2aec22931c7d04cb2e2d586e6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 26 Oct 2017 15:51:25 +0300 Subject: [PATCH 2/3] Remove print --- src/komodo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo.h b/src/komodo.h index 185bfa347..c5057646f 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -407,7 +407,7 @@ int32_t komodo_voutupdate(int32_t *isratificationp,int32_t notaryid,uint8_t *scr komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0,0,0); len += 4; if ( ASSETCHAINS_SYMBOL[0] != 0 ) - printf("[%s] ht.%d NOTARIZED.%d %s.%s %sTXID.%s (%s) lens.(%d %d)\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,kmdtxid.ToString().c_str(),ASSETCHAINS_SYMBOL[0]==0?"BTC":"KMD",desttxid.ToString().c_str(),(char *)&scriptbuf[len],opretlen,len); + printf("[%s] ht.%d NOTARIZED.%d %s.%s %sTXID.%s lens.(%d %d)\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,kmdtxid.ToString().c_str(),ASSETCHAINS_SYMBOL[0]==0?"BTC":"KMD",desttxid.ToString().c_str(),opretlen,len); if ( ASSETCHAINS_SYMBOL[0] == 0 ) { if ( signedfp == 0 ) From 31e342b831a486fa3b5fbb1f52ca7c87a166eadf Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 30 Oct 2017 21:03:20 +0200 Subject: [PATCH 3/3] Notarize CHIPS --- src/dpowassets | 1 + src/komodo_interest.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dpowassets b/src/dpowassets index fde738e44..5e0facea0 100755 --- a/src/dpowassets +++ b/src/dpowassets @@ -23,6 +23,7 @@ curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dp curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CEAL\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MESH\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MNZ\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHIPS\",\"pubkey\":\"$pubkey\"}" #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"USD\",\"pubkey\":\"$pubkey\"}" diff --git a/src/komodo_interest.h b/src/komodo_interest.h index 1795a64bf..c5a35492d 100644 --- a/src/komodo_interest.h +++ b/src/komodo_interest.h @@ -90,7 +90,7 @@ uint64_t _komodo_interestnew(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime uint64_t komodo_interestnew(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uint32_t tiptime) { uint64_t interest = 0; - if ( komodo_moneysupply(txheight) < MAX_MONEY && nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= 10*COIN ) + if ( txheight < 7777777 && komodo_moneysupply(txheight) < MAX_MONEY && nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= 10*COIN ) interest = _komodo_interestnew(nValue,nLockTime,tiptime); return(interest); } @@ -101,6 +101,8 @@ uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uin activation = 1491350400; // 1491350400 5th April if ( ASSETCHAINS_SYMBOL[0] != 0 ) return(0); + if ( txheight >= 7777777 ) + return(0); if ( komodo_moneysupply(txheight) < MAX_MONEY && nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= 10*COIN ) { if ( (minutes= (tiptime - nLockTime) / 60) >= 60 )