KOMODO_DEFS_H

This commit is contained in:
jl777
2017-11-10 19:15:34 +02:00
parent cc30b05e0d
commit 5416af1ddc
15 changed files with 32 additions and 3 deletions

View File

@@ -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"

View File

@@ -15,6 +15,7 @@
#ifndef H_KOMODO_H
#define H_KOMODO_H
#include "komodo_defs.h"
#ifdef _WIN32
#define printf(...)

View File

@@ -23,6 +23,8 @@
#include <curl/easy.h>
#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; };

9
src/komodo_defs.h Normal file
View File

@@ -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

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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);

View File

@@ -13,6 +13,8 @@
* *
******************************************************************************/
#include "komodo_defs.h"
#define SATOSHIDEN ((uint64_t)100000000L)
#define dstr(x) ((double)(x) / SATOSHIDEN)

View File

@@ -27,6 +27,7 @@
#ifdef _WIN32
#include <wincrypt.h>
#endif
#include "komodo_defs.h"
#define JUMBLR_ADDR "RGhxXpXSSBTBm9EvNsXnTQczthMCxHX91t"
#define JUMBLR_BTCADDR "18RmTJe9qMech8siuhYfMtHo8RtcN1obC6"

View File

@@ -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 )

View File

@@ -13,6 +13,8 @@
* *
******************************************************************************/
#include "komodo_defs.h"
#include "komodo_cJSON.h"
#define KOMODO_MAINNET_START 178999

View File

@@ -13,6 +13,8 @@
* *
******************************************************************************/
#include "komodo_defs.h"
#define USD 0
#define EUR 1
#define JPY 2

View File

@@ -13,6 +13,8 @@
* *
******************************************************************************/
#include "komodo_defs.h"
#include "uthash.h"
#include "utlist.h"

View File

@@ -12,6 +12,8 @@
* Removal or modification of this copyright notice is prohibited. *
* *
******************************************************************************/
#include "komodo_defs.h"
#ifdef _WIN32
#include <sodium.h>
#include <boost/date_time/posix_time/posix_time.hpp>

View File

@@ -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;