miner.h 603 B

123456789101112131415161718192021
  1. #ifndef __MINER_H__
  2. #define __MINER_H__
  3. #include <stdbool.h>
  4. #include <jansson.h>
  5. #ifndef ARRAY_SIZE
  6. #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
  7. #endif
  8. extern bool opt_protocol;
  9. extern json_t *json_rpc_call(const char *url, const char *userpass,
  10. const char *rpc_req);
  11. extern char *bin2hex(unsigned char *p, size_t len);
  12. extern bool hex2bin(unsigned char *p, const char *hexstr, size_t len);
  13. extern unsigned int ScanHash_4WaySSE2(unsigned char *pmidstate,
  14. unsigned char *pdata, unsigned char *phash1, unsigned char *phash,
  15. unsigned int *nHashesDone);
  16. #endif /* __MINER_H__ */