]> Git Repo - VerusCoin.git/blame - src/komodo_structs.h
test
[VerusCoin.git] / src / komodo_structs.h
CommitLineData
3face669 1/******************************************************************************
37fed603 2 * Copyright © 2014-2017 The SuperNET Developers. *
3face669 3 * *
4 * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at *
5 * the top-level directory of this distribution for the individual copyright *
6 * holder information and the developer policies on copyright and licensing. *
7 * *
8 * Unless otherwise agreed in a custom licensing agreement, no part of the *
9 * SuperNET software, including this file may be copied, modified, propagated *
10 * or distributed except according to the terms contained in the LICENSE file *
11 * *
12 * Removal or modification of this copyright notice is prohibited. *
13 * *
14 ******************************************************************************/
15
5fb74817 16#include "uthash.h"
17#include "utlist.h"
18
d3d31824 19/*#ifdef WIN32
ab918767 20#define PACKED
21#else
22#define PACKED __attribute__((packed))
d3d31824 23#endif*/
ab918767 24
45a3a2ff 25#define GENESIS_NBITS 0x1f00ffff
aa114a60 26#define KOMODO_MINRATIFY ((height < 90000) ? 7 : 11)
45a3a2ff 27#define KOMODO_MAXBLOCKS 5000000
28
ab918767 29#define KOMODO_EVENT_RATIFY 'P'
30#define KOMODO_EVENT_NOTARIZED 'N'
31#define KOMODO_EVENT_KMDHEIGHT 'K'
32#define KOMODO_EVENT_REWIND 'B'
33#define KOMODO_EVENT_PRICEFEED 'V'
34#define KOMODO_EVENT_OPRETURN 'R'
35#define KOMODO_OPRETURN_DEPOSIT 'D'
36#define KOMODO_OPRETURN_ISSUED 'I' // assetchain
37#define KOMODO_OPRETURN_WITHDRAW 'W' // assetchain
38#define KOMODO_OPRETURN_REDEEMED 'X'
39
1919e9de 40struct komodo_kv { UT_hash_handle hh; uint8_t *key,*value; int32_t height; uint32_t flags; uint16_t keylen,valuesize; };
15d0fbd4 41
ab918767 42struct komodo_event_notarized { uint256 blockhash,desttxid; int32_t notarizedheight; char dest[16]; };
43struct komodo_event_pubkeys { uint8_t num; uint8_t pubkeys[64][33]; };
44struct komodo_event_opreturn { uint256 txid; uint64_t value; uint16_t vout,oplen; uint8_t opret[]; };
45struct komodo_event_pricefeed { uint8_t num; uint32_t prices[35]; };
46
47struct komodo_event
48{
49 struct komodo_event *related;
50 uint16_t len;
51 int32_t height;
52 uint8_t type,reorged;
53 char symbol[16];
54 uint8_t space[];
d3d31824 55};
ab918767 56
3face669 57struct pax_transaction
58{
59 UT_hash_handle hh;
60 uint256 txid;
992c3be5 61 uint64_t komodoshis,fiatoshis,validated;
115e6a5c 62 int32_t marked,height,otherheight,approved,didstats,ready;
3face669 63 uint16_t vout;
afa0d2b9 64 char symbol[16],source[16],coinaddr[64]; uint8_t rmd160[20],type,buf[35];
3face669 65};
66
3face669 67struct knotary_entry { UT_hash_handle hh; uint8_t pubkey[33],notaryid; };
68struct knotaries_entry { int32_t height,numnotaries; struct knotary_entry *Notaries; };
69struct notarized_checkpoint { uint256 notarized_hash,notarized_desttxid; int32_t nHeight,notarized_height; };
d1289e41 70
71struct komodo_state
72{
73 uint256 NOTARIZED_HASH,NOTARIZED_DESTTXID;
e7a90cf9 74 int32_t SAVEDHEIGHT,CURRENT_HEIGHT,NOTARIZED_HEIGHT;
f1db88ea 75 uint32_t SAVEDTIMESTAMP;
aa114a60 76 uint64_t deposited,issued,withdrawn,approved,redeemed,shorted;
03ef7187 77 struct notarized_checkpoint *NPOINTS; int32_t NUM_NPOINTS;
ab918767 78 struct komodo_event **Komodo_events; int32_t Komodo_numevents;
635dd34d 79 uint32_t RTbufs[64][3]; uint64_t RTmask;
d1289e41 80};
This page took 0.078985 seconds and 4 git commands to generate.