diff --git a/src/komodo-tx.cpp b/src/komodo-tx.cpp index 19d0440dd..645bc30a2 100644 --- a/src/komodo-tx.cpp +++ b/src/komodo-tx.cpp @@ -27,6 +27,7 @@ using namespace std; #include "arith_uint256.h" #include "komodo_structs.h" #include "komodo_globals.h" +#include "komodo_defs.h" #include "komodo_interest.h" diff --git a/src/komodo.h b/src/komodo.h index fb2160da7..e8ab6d6be 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -15,6 +15,7 @@ #ifndef H_KOMODO_H #define H_KOMODO_H +#include "komodo_defs.h" #ifdef _WIN32 #define printf(...) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index d356bd6bf..29849f295 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -23,6 +23,8 @@ #include #endif +#include "komodo_defs.h" + //#define issue_curl(cmdstr) bitcoind_RPC(0,(char *)"curl",(char *)"http://127.0.0.1:7776",0,0,(char *)(cmdstr)) struct MemoryStruct { char *memory; size_t size; }; diff --git a/src/komodo_defs.h b/src/komodo_defs.h new file mode 100644 index 000000000..db792c44e --- /dev/null +++ b/src/komodo_defs.h @@ -0,0 +1,9 @@ +#ifndef KOMODO_DEFS_H +#define KOMODO_DEFS_H + +#define ASSETCHAINS_MINHEIGHT 128 +#define KOMODO_ELECTION_GAP 2000 +#define ROUNDROBIN_DELAY 61 +#define KOMODO_ASSETCHAIN_MAXLEN 65 + +#endif diff --git a/src/komodo_events.h b/src/komodo_events.h index 753413e9f..ff054c3bb 100644 --- a/src/komodo_events.h +++ b/src/komodo_events.h @@ -15,6 +15,7 @@ #ifndef H_KOMODOEVENTS_H #define H_KOMODOEVENTS_H +#include "komodo_defs.h" struct komodo_event *komodo_eventadd(struct komodo_state *sp,int32_t height,char *symbol,uint8_t type,uint8_t *data,uint16_t datalen) { diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index a83bac7d5..d655f2aa5 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -14,6 +14,7 @@ ******************************************************************************/ // paxdeposit equivalent in reverse makes opreturn and KMD does the same in reverse +#include "komodo_defs.h" int32_t pax_fiatstatus(uint64_t *available,uint64_t *deposited,uint64_t *issued,uint64_t *withdrawn,uint64_t *approved,uint64_t *redeemed,char *base) { diff --git a/src/komodo_globals.h b/src/komodo_globals.h index bd01daa53..e945beeee 100644 --- a/src/komodo_globals.h +++ b/src/komodo_globals.h @@ -13,6 +13,8 @@ * * ******************************************************************************/ +#include "komodo_defs.h" + void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals,int32_t kheight,uint32_t ktime,uint64_t opretvalue,uint8_t *opretbuf,uint16_t opretlen,uint16_t vout); void komodo_init(int32_t height); int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *notarized_desttxidp); diff --git a/src/komodo_interest.h b/src/komodo_interest.h index 798eda48e..97f288b4c 100644 --- a/src/komodo_interest.h +++ b/src/komodo_interest.h @@ -13,6 +13,8 @@ * * ******************************************************************************/ +#include "komodo_defs.h" + #define SATOSHIDEN ((uint64_t)100000000L) #define dstr(x) ((double)(x) / SATOSHIDEN) diff --git a/src/komodo_jumblr.h b/src/komodo_jumblr.h index baafc6dbe..a5eff09a5 100755 --- a/src/komodo_jumblr.h +++ b/src/komodo_jumblr.h @@ -27,6 +27,7 @@ #ifdef _WIN32 #include #endif +#include "komodo_defs.h" #define JUMBLR_ADDR "RGhxXpXSSBTBm9EvNsXnTQczthMCxHX91t" #define JUMBLR_BTCADDR "18RmTJe9qMech8siuhYfMtHo8RtcN1obC6" diff --git a/src/komodo_kv.h b/src/komodo_kv.h index 6d080069a..0d86fadd0 100644 --- a/src/komodo_kv.h +++ b/src/komodo_kv.h @@ -16,6 +16,8 @@ #ifndef H_KOMODOKV_H #define H_KOMODOKV_H +#include "komodo_defs.h" + int32_t komodo_kvcmp(uint8_t *refvalue,uint16_t refvaluesize,uint8_t *value,uint16_t valuesize) { if ( refvalue == 0 && value == 0 ) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index c725f03c4..a306f848f 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -13,6 +13,8 @@ * * ******************************************************************************/ +#include "komodo_defs.h" + #include "komodo_cJSON.h" #define KOMODO_MAINNET_START 178999 diff --git a/src/komodo_pax.h b/src/komodo_pax.h index d1713e234..bcf6fa5d7 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -13,6 +13,8 @@ * * ******************************************************************************/ +#include "komodo_defs.h" + #define USD 0 #define EUR 1 #define JPY 2 diff --git a/src/komodo_structs.h b/src/komodo_structs.h index cd3adfa00..40212c3e3 100644 --- a/src/komodo_structs.h +++ b/src/komodo_structs.h @@ -13,6 +13,8 @@ * * ******************************************************************************/ +#include "komodo_defs.h" + #include "uthash.h" #include "utlist.h" diff --git a/src/komodo_utils.h b/src/komodo_utils.h index c6469a350..ef64ad75c 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -12,6 +12,8 @@ * Removal or modification of this copyright notice is prohibited. * * * ******************************************************************************/ +#include "komodo_defs.h" + #ifdef _WIN32 #include #include diff --git a/src/miner.cpp b/src/miner.cpp index bbdbe93da..5c12d0af6 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -106,9 +106,8 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, consensusParams); } -#define ASSETCHAINS_MINHEIGHT 128 -#define KOMODO_ELECTION_GAP 2000 -#define ROUNDROBIN_DELAY 61 +#include "komodo_defs.h" + extern int32_t ASSETCHAINS_SEED,IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAIN_INIT,KOMODO_INITDONE,KOMODO_ON_DEMAND,KOMODO_INITDONE,KOMODO_PASSPORT_INITDONE; extern char ASSETCHAINS_SYMBOL[KOMODO_ASSETCHAIN_MAXLEN]; extern std::string NOTARY_PUBKEY;