Initial commit of NovaCoin changes
[novacoin.git] / src / scrypt_mine.h
1 #ifndef SCRYPT_MINE_H\r
2 #define SCRYPT_MINE_H\r
3 \r
4 #include <stdint.h>\r
5 #include <stdlib.h>\r
6 \r
7 #include "util.h"\r
8 #include "net.h"\r
9 \r
10 typedef struct\r
11 {\r
12     unsigned int version;\r
13     uint256 prev_block;\r
14     uint256 merkle_root;\r
15     unsigned int timestamp;\r
16     unsigned int bits;\r
17     unsigned int nonce;\r
18 \r
19 } block_header;\r
20 \r
21 void *scrypt_buffer_alloc();\r
22 void scrypt_buffer_free(void *scratchpad);\r
23 \r
24 unsigned int scanhash_scrypt(block_header *pdata, void *scratchbuf,
25     uint32_t max_nonce, uint32_t &hash_count,
26     void *result, block_header *res_header);
27 \r
28 void scrypt_hash(const void* input, size_t inputlen, uint32_t *res, void *scratchpad);\r
29 \r
30 #endif // SCRYPT_MINE_H\r