Merge remote-tracking branch 'origin/dev' into cryptoconditions

This commit is contained in:
Scott Sadler
2018-02-18 19:25:52 -03:00
108 changed files with 1706 additions and 752 deletions

View File

@@ -13,10 +13,12 @@
* *
******************************************************************************/
#include "komodo_defs.h"
#include "uthash.h"
#include "utlist.h"
/*#ifdef WIN32
/*#ifdef _WIN32
#define PACKED
#else
#define PACKED __attribute__((packed))
@@ -27,7 +29,8 @@
#define GENESIS_NBITS 0x1f00ffff
#define KOMODO_MINRATIFY ((height < 90000) ? 7 : 11)
#define KOMODO_MAXBLOCKS 5000000
#define KOMODO_NOTARIES_HARDCODED 180000 // DONT CHANGE
#define KOMODO_MAXBLOCKS 250000 // DONT CHANGE
#define KOMODO_EVENT_RATIFY 'P'
#define KOMODO_EVENT_NOTARIZED 'N'
@@ -43,6 +46,7 @@
#define KOMODO_KVPROTECTED 1
#define KOMODO_KVBINARY 2
#define KOMODO_KVDURATION 1440
#define KOMODO_ASSETCHAIN_MAXLEN 65
union _bits256 { uint8_t bytes[32]; uint16_t ushorts[16]; uint32_t uints[8]; uint64_t ulongs[4]; uint64_t txid; };
typedef union _bits256 bits256;
@@ -63,7 +67,7 @@ struct komodo_event
uint16_t len;
int32_t height;
uint8_t type,reorged;
char symbol[16];
char symbol[KOMODO_ASSETCHAIN_MAXLEN];
uint8_t space[];
};
@@ -74,7 +78,7 @@ struct pax_transaction
uint64_t komodoshis,fiatoshis,validated;
int32_t marked,height,otherheight,approved,didstats,ready;
uint16_t vout;
char symbol[16],source[16],coinaddr[64]; uint8_t rmd160[20],type,buf[35];
char symbol[KOMODO_ASSETCHAIN_MAXLEN],source[KOMODO_ASSETCHAIN_MAXLEN],coinaddr[64]; uint8_t rmd160[20],type,buf[35];
};
struct knotary_entry { UT_hash_handle hh; uint8_t pubkey[33],notaryid; };
@@ -87,7 +91,7 @@ struct komodo_state
int32_t SAVEDHEIGHT,CURRENT_HEIGHT,NOTARIZED_HEIGHT;
uint32_t SAVEDTIMESTAMP;
uint64_t deposited,issued,withdrawn,approved,redeemed,shorted;
struct notarized_checkpoint *NPOINTS; int32_t NUM_NPOINTS;
struct notarized_checkpoint *NPOINTS; int32_t NUM_NPOINTS,last_NPOINTSi;
struct komodo_event **Komodo_events; int32_t Komodo_numevents;
uint32_t RTbufs[64][3]; uint64_t RTmask;
};