KOMODO_DEFS_H
This commit is contained in:
@@ -27,6 +27,7 @@ using namespace std;
|
|||||||
#include "arith_uint256.h"
|
#include "arith_uint256.h"
|
||||||
#include "komodo_structs.h"
|
#include "komodo_structs.h"
|
||||||
#include "komodo_globals.h"
|
#include "komodo_globals.h"
|
||||||
|
#include "komodo_defs.h"
|
||||||
|
|
||||||
#include "komodo_interest.h"
|
#include "komodo_interest.h"
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#ifndef H_KOMODO_H
|
#ifndef H_KOMODO_H
|
||||||
#define H_KOMODO_H
|
#define H_KOMODO_H
|
||||||
|
#include "komodo_defs.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define printf(...)
|
#define printf(...)
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
#include <curl/easy.h>
|
#include <curl/easy.h>
|
||||||
#endif
|
#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))
|
//#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; };
|
struct MemoryStruct { char *memory; size_t size; };
|
||||||
|
|||||||
9
src/komodo_defs.h
Normal file
9
src/komodo_defs.h
Normal 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
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#ifndef H_KOMODOEVENTS_H
|
#ifndef H_KOMODOEVENTS_H
|
||||||
#define 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)
|
struct komodo_event *komodo_eventadd(struct komodo_state *sp,int32_t height,char *symbol,uint8_t type,uint8_t *data,uint16_t datalen)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
// paxdeposit equivalent in reverse makes opreturn and KMD does the same in reverse
|
// 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)
|
int32_t pax_fiatstatus(uint64_t *available,uint64_t *deposited,uint64_t *issued,uint64_t *withdrawn,uint64_t *approved,uint64_t *redeemed,char *base)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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_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);
|
void komodo_init(int32_t height);
|
||||||
int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *notarized_desttxidp);
|
int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *notarized_desttxidp);
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
* *
|
* *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
#include "komodo_defs.h"
|
||||||
|
|
||||||
#define SATOSHIDEN ((uint64_t)100000000L)
|
#define SATOSHIDEN ((uint64_t)100000000L)
|
||||||
#define dstr(x) ((double)(x) / SATOSHIDEN)
|
#define dstr(x) ((double)(x) / SATOSHIDEN)
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <wincrypt.h>
|
#include <wincrypt.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include "komodo_defs.h"
|
||||||
|
|
||||||
#define JUMBLR_ADDR "RGhxXpXSSBTBm9EvNsXnTQczthMCxHX91t"
|
#define JUMBLR_ADDR "RGhxXpXSSBTBm9EvNsXnTQczthMCxHX91t"
|
||||||
#define JUMBLR_BTCADDR "18RmTJe9qMech8siuhYfMtHo8RtcN1obC6"
|
#define JUMBLR_BTCADDR "18RmTJe9qMech8siuhYfMtHo8RtcN1obC6"
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
#ifndef H_KOMODOKV_H
|
#ifndef H_KOMODOKV_H
|
||||||
#define 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)
|
int32_t komodo_kvcmp(uint8_t *refvalue,uint16_t refvaluesize,uint8_t *value,uint16_t valuesize)
|
||||||
{
|
{
|
||||||
if ( refvalue == 0 && value == 0 )
|
if ( refvalue == 0 && value == 0 )
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
* *
|
* *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
#include "komodo_defs.h"
|
||||||
|
|
||||||
#include "komodo_cJSON.h"
|
#include "komodo_cJSON.h"
|
||||||
|
|
||||||
#define KOMODO_MAINNET_START 178999
|
#define KOMODO_MAINNET_START 178999
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
* *
|
* *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
#include "komodo_defs.h"
|
||||||
|
|
||||||
#define USD 0
|
#define USD 0
|
||||||
#define EUR 1
|
#define EUR 1
|
||||||
#define JPY 2
|
#define JPY 2
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
* *
|
* *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
#include "komodo_defs.h"
|
||||||
|
|
||||||
#include "uthash.h"
|
#include "uthash.h"
|
||||||
#include "utlist.h"
|
#include "utlist.h"
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
* Removal or modification of this copyright notice is prohibited. *
|
* Removal or modification of this copyright notice is prohibited. *
|
||||||
* *
|
* *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
#include "komodo_defs.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <sodium.h>
|
#include <sodium.h>
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
|
|||||||
@@ -106,9 +106,8 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams,
|
|||||||
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, consensusParams);
|
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, consensusParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ASSETCHAINS_MINHEIGHT 128
|
#include "komodo_defs.h"
|
||||||
#define KOMODO_ELECTION_GAP 2000
|
|
||||||
#define ROUNDROBIN_DELAY 61
|
|
||||||
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 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 char ASSETCHAINS_SYMBOL[KOMODO_ASSETCHAIN_MAXLEN];
|
||||||
extern std::string NOTARY_PUBKEY;
|
extern std::string NOTARY_PUBKEY;
|
||||||
|
|||||||
Reference in New Issue
Block a user