From 3face66929220827b6a5f171f4cd5c4263448ebe Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 17 Nov 2016 18:48:05 -0300 Subject: [PATCH] test --- src/bitcoin-cli.cpp | 1 + src/komodo.h | 17 ++--------------- src/komodo_globals.h | 1 + src/komodo_structs.h | 29 +++++++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 15 deletions(-) create mode 100644 src/komodo_structs.h diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index e7b0b1476..982e27688 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -60,6 +60,7 @@ public: #include "arith_uint256.h" int8_t Minerids[1024 * 1024 * 5]; // 5 million blocks +#include "komodo_structs.h" #include "komodo_globals.h" #include "komodo_utils.h" diff --git a/src/komodo.h b/src/komodo.h index 9d0dd3857..069019fd5 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -37,25 +37,12 @@ #define KOMODO_MINRATIFY 7 #define KOMODO_MAXBLOCKS 5000000 +#include "komodo_structs.h" + FILE *Minerfp; int8_t Minerids[KOMODO_MAXBLOCKS]; // 5 million blocks #define KOMODO_ELECTION_GAP ((ASSETCHAINS_SYMBOL[0] == 0) ? 2000 : 100) -struct pax_transaction -{ - UT_hash_handle hh; - uint256 txid; - uint64_t komodoshis,fiatoshis; - int32_t marked,height,otherheight; - uint16_t vout; - char symbol[16],coinaddr[64]; uint8_t rmd160[20],shortflag; -}; - -struct nutxo_entry { UT_hash_handle hh; uint256 txhash; uint64_t voutmask; int32_t notaryid,height; }; -struct knotary_entry { UT_hash_handle hh; uint8_t pubkey[33],notaryid; }; -struct knotaries_entry { int32_t height,numnotaries; struct knotary_entry *Notaries; }; -struct notarized_checkpoint { uint256 notarized_hash,notarized_desttxid; int32_t nHeight,notarized_height; }; -pthread_mutex_t komodo_mutex; int32_t KMDHEIGHT = 43000; struct pax_transaction *PAX; diff --git a/src/komodo_globals.h b/src/komodo_globals.h index 693bf429a..bd04931ae 100644 --- a/src/komodo_globals.h +++ b/src/komodo_globals.h @@ -21,6 +21,7 @@ void komodo_init(int32_t height); void komodo_assetchain_pubkeys(char *jsonstr); int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33); +pthread_mutex_t komodo_mutex; int COINBASE_MATURITY = 100; int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND; diff --git a/src/komodo_structs.h b/src/komodo_structs.h new file mode 100644 index 000000000..138051231 --- /dev/null +++ b/src/komodo_structs.h @@ -0,0 +1,29 @@ +/****************************************************************************** + * Copyright © 2014-2016 The SuperNET Developers. * + * * + * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * + * the top-level directory of this distribution for the individual copyright * + * holder information and the developer policies on copyright and licensing. * + * * + * Unless otherwise agreed in a custom licensing agreement, no part of the * + * SuperNET software, including this file may be copied, modified, propagated * + * or distributed except according to the terms contained in the LICENSE file * + * * + * Removal or modification of this copyright notice is prohibited. * + * * + ******************************************************************************/ + +struct pax_transaction +{ + UT_hash_handle hh; + uint256 txid; + uint64_t komodoshis,fiatoshis; + int32_t marked,height,otherheight; + uint16_t vout; + char symbol[16],coinaddr[64]; uint8_t rmd160[20],shortflag; +}; + +struct nutxo_entry { UT_hash_handle hh; uint256 txhash; uint64_t voutmask; int32_t notaryid,height; }; +struct knotary_entry { UT_hash_handle hh; uint8_t pubkey[33],notaryid; }; +struct knotaries_entry { int32_t height,numnotaries; struct knotary_entry *Notaries; }; +struct notarized_checkpoint { uint256 notarized_hash,notarized_desttxid; int32_t nHeight,notarized_height; };