[BREAKGLASS] MIT-licensed C implementation of getblocktemplate
Go to file
2016-08-11 07:38:58 +00:00
.gitignore gitignore autotools compile wrapper 2016-07-30 22:19:35 +00:00
AUTHORS AUTHORS: Add myself 2014-11-21 23:47:44 +00:00
autogen.sh Add missing copyright headers 2013-06-13 07:26:54 +00:00
base58.c Bugfix: b58tobin: Correct zeromask for multiple-of-four binary buffer sizes 2014-08-22 18:39:45 +00:00
blkmaker_jansson.c Merge branch 'bip9_0.4.x' into 0.4.x 2016-07-26 03:22:05 +00:00
blkmaker_jansson.h Add "foreign" submit function to create a call suitable for a local bitcoind 2013-04-05 14:44:55 +00:00
blkmaker.c Merge commit '15745d4' into 0.4.x 2016-08-11 07:38:58 +00:00
blkmaker.h Parse BIP 9 template fields, and implement handling of unrecognised rules 2016-05-25 03:51:52 +00:00
blktemplate.c Merge commit '723a7e5' into 0.4.x 2016-08-10 22:04:58 +00:00
blktemplate.h Merge commit '15745d4' into 0.4.x 2016-08-11 07:38:58 +00:00
configure.ac Bump versions for 0.4.3 2015-11-09 05:33:41 +00:00
COPYING COPYING: Update copyright year to 2014 2014-01-19 04:36:06 +00:00
example.c Add missing copyright headers 2013-06-13 07:26:54 +00:00
hex.c Add missing copyright headers 2013-06-01 14:51:23 +00:00
libblkmaker_jansson.pc.in Automake build system 2012-09-15 07:55:19 +00:00
Makefile.am Bugfix: Include private.h in SOURCES 2014-08-22 17:52:26 +00:00
private.h Parse BIP 9 template fields, and implement handling of unrecognised rules 2016-05-25 03:51:52 +00:00
README blkmk_get_mdata: Accept can_roll_ntime as an argument 2014-05-03 22:37:08 +00:00
testinput.c Add missing copyright headers 2013-06-13 07:26:54 +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
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.