[BREAKGLASS] MIT-licensed C implementation of getblocktemplate
Go to file
2016-08-13 08:35:37 +00:00
.gitignore Initial unit tests covering template and parsing 2016-08-13 08:27:39 +00:00
.travis.yml Travis: Build for Windows and test in WINE 2016-08-13 08:35:37 +00:00
AUTHORS AUTHORS: Add myself 2014-11-21 23:47:44 +00:00
autogen.sh No longer call configure from autogen.sh 2014-08-22 17:43:04 +00:00
base58.c base58: Remove now-unused b58digits array 2014-08-29 15:50:01 +00:00
blkmaker_jansson.c Merge branch '0.5.x' 2016-08-11 07:43:42 +00:00
blkmaker_jansson.h Make new BIP 9 features public 2016-05-25 03:55:31 +00:00
blkmaker.c Bugfix: blkmk_append_coinbase_safe2: Check for unexpected larger values before subtracting (in sigop checks) 2016-08-13 08:26:46 +00:00
blkmaker.h Make new BIP 9 features public 2016-05-25 03:55:31 +00:00
blktemplate.c ABI break: Remove blktemplate_t.{min,max}nonce, since it was never supported and is unlikely to ever be useful 2016-08-11 09:12:35 +00:00
blktemplate.h ABI break: Remove blktemplate_t.{min,max}nonce, since it was never supported and is unlikely to ever be useful 2016-08-11 09:12:35 +00:00
configure.ac Minor fixups for "make example" 2016-07-26 03:20:08 +00:00
COPYING COPYING: Update copyright year to 2014 2014-01-19 04:36:06 +00:00
example.c Bugfix: example: Deal with build and portability issues 2016-08-13 08:22:47 +00:00
hex.c Add missing copyright headers 2013-06-13 07:25:49 +00:00
libblkmaker_jansson.pc.in pc: Add libbase58 to Requires.private 2014-11-21 23:10:39 +00:00
Makefile.am Initial unit tests covering template and parsing 2016-08-13 08:27:39 +00:00
private.h Merge integer unpacking code 2016-07-26 02:51:12 +00:00
README "make example" builds example.c if libgcrypt present 2016-06-22 13:03:18 -07:00
test.c Initial unit tests covering template and parsing 2016-08-13 08:27:39 +00:00
testinput.c Add missing copyright headers 2013-06-13 07:25:49 +00:00

Dependencies:
	Jansson 2.0 with 'long long' support

Example dependencies:
	Jansson 2.1 (to read JSON from stdin)
	libgcrypt (for SHA256)

For usage, check out example.c. Run "make example" to build it.

Note that you must assign blkmk_sha256_impl to a function pointer:
	bool mysha256(void *hash_out, const void *data, size_t datasz)
hash_out must be able to overlap with data!

Also note that you should NOT roll ntime for data retrieved without explicitly
checking that it falls within the template's limitations (mintime, maxtime,
mintimeoff, and maxtimeoff); read the BIP 23 specification in detail to
understand how they work. It is usually best to simply get more data as often
as it is needed. For blkmk_get_mdata, you may specify that you intend to roll
the ntime header exactly once per second past usetime - it will then set
*out_expires such that the expiration occurs before you roll beyond any ntime
limits. If you are rolling ntime at any rate other than once per second, you
should NOT specify can_roll_ntime to blkmk_get_mdata, and must check that your
usage falls within the explicit template limits yourself.