Browse Source

Move gbtbase_t to bitcoin header

master
Con Kolivas 11 years ago
parent
commit
c98ed16e38
  1. 1
      src/bitcoin.c
  2. 23
      src/bitcoin.h
  3. 23
      src/libckpool.h

1
src/bitcoin.c

@ -13,6 +13,7 @@
#include "ckpool.h"
#include "libckpool.h"
#include "bitcoin.h"
static const char *b58chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";

23
src/bitcoin.h

@ -10,6 +10,29 @@
#ifndef BITCOIN_H
#define BITCOIN_H
struct gbtbase {
uchar previousblockhash[32];
uchar target[32];
double sdiff;
uint32_t version;
uint32_t curtime;
uchar prev_hash[68];
char ntime[12];
char bbversion[12];
char nbit[12];
int nValue;
uint32_t bits;
int height;
char *txn_data;
uchar *txn_hashes;
int transactions;
int merkles;
uchar merklebin[16][32];
char merklehash[16][68];
};
typedef struct gbtbase gbtbase_t;
bool validate_address(connsock_t *cs, const char *address);
bool gen_gbtbase(connsock_t *cs, gbtbase_t *gbt);
int get_blockcount(connsock_t *cs);

23
src/libckpool.h

@ -107,29 +107,6 @@ struct connsock {
typedef struct connsock connsock_t;
struct gbtbase {
uchar previousblockhash[32];
uchar target[32];
double sdiff;
uint32_t version;
uint32_t curtime;
uchar prev_hash[68];
char ntime[12];
char bbversion[12];
char nbit[12];
int nValue;
uint32_t bits;
int height;
char *txn_data;
uchar *txn_hashes;
int transactions;
int merkles;
uchar merklebin[16][32];
char merklehash[16][68];
};
typedef struct gbtbase gbtbase_t;
void _mutex_lock(pthread_mutex_t *lock, const char *file, const char *func, const int line);
void _mutex_unlock_noyield(pthread_mutex_t *lock, const char *file, const char *func, const int line);
void _mutex_unlock(pthread_mutex_t *lock, const char *file, const char *func, const int line);

Loading…
Cancel
Save