From a6400079556c5ade22c0404a29bf69ae2595075b Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 30 Oct 2016 08:24:13 -0300 Subject: [PATCH] test --- src/komodo.h | 4 ++-- src/komodo_gateway.h | 4 ++-- src/main.cpp | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 18fb286a4..8ccd7c8cf 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -303,7 +303,7 @@ int32_t komodo_voutupdate(int32_t notaryid,uint8_t *scriptbuf,int32_t scriptlen, //for (k=0; k= 32*2+4 && strcmp(KOMODO_SOURCE,(char *)&scriptbuf[len+32*2+4]) == 0 ) + if ( j == 1 && opretlen >= 32*2+4 && strcmp(ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,(char *)&scriptbuf[len+32*2+4]) == 0 ) { len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&kmdtxid); len += iguana_rwnum(0,&scriptbuf[len],4,(uint8_t *)notarizedheightp); @@ -315,7 +315,7 @@ int32_t komodo_voutupdate(int32_t notaryid,uint8_t *scriptbuf,int32_t scriptlen, NOTARIZED_HASH = kmdtxid; NOTARIZED_DESTTXID = desttxid; komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0,0); - } else printf("reject ht.%d NOTARIZED.%d %s.%s DESTTXID.%s (%s)\n",height,*notarizedheightp,KOMODO_SOURCE,kmdtxid.ToString().c_str(),desttxid.ToString().c_str(),(char *)&scriptbuf[len]); + } else printf("reject ht.%d NOTARIZED.%d %s.%s DESTTXID.%s (%s)\n",height,*notarizedheightp,ASSETCHAINS_SYMBOL[0]==0?"KMD":ASSETCHAINS_SYMBOL,kmdtxid.ToString().c_str(),desttxid.ToString().c_str(),(char *)&scriptbuf[len]); } else if ( i == 0 && j == 1 && opretlen == 149 ) komodo_paxpricefeed(height,&scriptbuf[len],opretlen); diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index c7e629e29..94d894392 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -178,8 +178,8 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3 else shortflag = 0; for (i=0; i<4; i++) base[i] = opretbuf[opretlen-4+i]; - printf("BASE.(%s) vs (%s)\n",base,KOMODO_SOURCE); - if ( strncmp(KOMODO_SOURCE,base,strlen(base)) == 0 && opretbuf[0] == 'I' ) + printf("BASE.(%s) vs (%s)\n",base,ASSETCHAINS_SYMBOL); + if ( strncmp(ASSETCHAINS_SYMBOL,base,strlen(base)) == 0 && opretbuf[0] == 'I' ) { uint256 issuedtxid; uint16_t issuedvout; opretbuf++, opretlen--; diff --git a/src/main.cpp b/src/main.cpp index f38016488..409827edc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -552,7 +552,6 @@ CBlockTreeDB *pblocktree = NULL; #define KOMODO_TESTNET_EXPIRATION 60000 //#define KOMODO_ENABLE_INTEREST enabling this is a hardfork -#define KOMODO_SOURCE "KMD" #define KOMODO_PAX #define KOMODO_ZCASH #include "komodo.h"