1 /******************************************************************************
2 * Copyright © 2014-2016 The SuperNET Developers. *
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. *
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 *
12 * Removal or modification of this copyright notice is prohibited. *
14 ******************************************************************************/
22 #define PACKED __attribute__((packed))
25 #define GENESIS_NBITS 0x1f00ffff
26 #define KOMODO_MINRATIFY 7
27 #define KOMODO_MAXBLOCKS 5000000
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'
40 struct komodo_event_notarized { uint256 blockhash,desttxid; int32_t notarizedheight; char dest[16]; };
41 struct komodo_event_pubkeys { uint8_t num; uint8_t pubkeys[64][33]; };
42 struct komodo_event_opreturn { uint256 txid; uint64_t value; uint16_t vout,oplen; uint8_t opret[]; };
43 struct komodo_event_pricefeed { uint8_t num; uint32_t prices[35]; };
47 struct komodo_event *related;
55 struct pax_transaction
59 uint64_t komodoshis,fiatoshis;
60 int32_t marked,height,otherheight;
62 char symbol[16],coinaddr[64]; uint8_t rmd160[20],shortflag;
65 //struct nutxo_entry { UT_hash_handle hh; uint256 txhash; uint64_t voutmask; int32_t notaryid,height; };
66 struct knotary_entry { UT_hash_handle hh; uint8_t pubkey[33],notaryid; };
67 struct knotaries_entry { int32_t height,numnotaries; struct knotary_entry *Notaries; };
68 struct notarized_checkpoint { uint256 notarized_hash,notarized_desttxid; int32_t nHeight,notarized_height; };
72 uint256 NOTARIZED_HASH,NOTARIZED_DESTTXID;
73 int32_t SAVEDHEIGHT,CURRENT_HEIGHT,NOTARIZED_HEIGHT;
74 uint32_t KOMODO_REALTIME;
75 struct komodo_event **Komodo_events; int32_t Komodo_numevents;