You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
3.7 KiB

9 years ago
/******************************************************************************
9 years ago
* Copyright © 2014-2016 The SuperNET Developers. *
9 years ago
* *
* 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. *
* *
******************************************************************************/
#ifndef iguana777_net_h
#define iguana777_net_h
8 years ago
#if defined(_WIN32) || defined(_WIN64)
#define WIN32
#endif
9 years ago
#if (defined(_WIN32) || defined(__WIN32__)) && \
!defined(WIN32) && !defined(__SYMBIAN32__)
#define WIN32
8 years ago
#endif
#ifdef WIN32
8 years ago
#define __MINGW
8 years ago
8 years ago
#else
8 years ago
#ifndef __MINGW
8 years ago
#include <arpa/inet.h>
9 years ago
#endif
8 years ago
#endif
9 years ago
9 years ago
//#define BTC2_VERSION
#define BTC2_HARDFORK_HEIGHT 444444
#define BTC2_SIGHASH_FORKID 0xcf
#define BTC2_NETMAGIC 0xaabbccdd
#define BTC2_DEFAULT_PORT 8222
#define BTC2_DIFF_WINDOW 60
struct supernet_info;
struct exchange_info;
#include "../crypto777/OS_portable.h"
9 years ago
#include "../datachain/datachain.h"
9 years ago
#include "../includes/iguana_defines.h"
#include "../includes/iguana_types.h"
#include "../includes/iguana_structs.h"
9 years ago
#include "../basilisk/basilisk.h"
struct supernet_address
{
bits256 pubkey,iphash,persistent;
uint32_t selfipbits,myipbits; int32_t confirmed,totalconfirmed; uint64_t nxt64bits;
char NXTADDR[32],BTC[64],BTCD[64];
};
9 years ago
8 years ago
struct liquidity_info { char base[64],rel[64]; double profit,refprice; };
8 years ago
struct message_info { int32_t msgcount; bits256 refhash,msghashes[64]; uint32_t timestamps[64]; };
8 years ago
9 years ago
struct supernet_info
{
struct supernet_address myaddr;
bits256 persistent_priv,privkey;
uint8_t persistent_pubkey33[33];
char ipaddr[64],NXTAPIURL[512],secret[4096],password[4096],rpcsymbol[64],handle[1024],permanentfile[1024];
9 years ago
char *decryptstr;
8 years ago
int32_t maxdelay,IAMRELAY,IAMLP,publicRPC,basilisk_busy,genesisresults;
8 years ago
uint32_t expiration,dirty,DEXactive,DEXpoll;
9 years ago
uint16_t argport,rpcport;
struct basilisk_info basilisks;
struct exchange_info *tradingexchanges[SUPERNET_MAXEXCHANGES]; int32_t numexchanges;
struct iguana_waccount *wallet;
struct iguana_info *allcoins; int32_t allcoins_being_added,allcoins_numvirts;
9 years ago
portable_mutex_t bu_mutex,allcoins_mutex,gecko_mutex,basilisk_mutex,DEX_mutex,DEX_reqmutex,DEX_swapmutex;
8 years ago
struct queueitem *DEX_quotes; cJSON *Cunspents,*Cspends;
9 years ago
struct basilisk_swap *swaps[256]; int32_t numswaps;
struct basilisk_message *messagetable; portable_mutex_t messagemutex; queue_t msgQ;
void *ctx;
uint8_t *pingbuf;
struct delayedPoW_info dPoW;
9 years ago
struct basilisk_spend *spends; int32_t numspends;
9 years ago
struct peggy_info *PEGS;
8 years ago
struct liquidity_info linfos[64];
9 years ago
// compatibility
bits256 pangea_category,instantdex_category;
9 years ago
uint8_t logs[256],exps[510];
8 years ago
struct message_info msgids[8192];
9 years ago
};
9 years ago
8 years ago
#include "../includes/iguana_funcs.h"
#include "../includes/iguana_globals.h"
#include "../gecko/gecko.h"
8 years ago
#ifndef MAX
#define MAX(a,b) ((a) >= (b) ? (a) : (b))
#endif
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
9 years ago
#endif