[BREAKGLASS] MIT-licensed C implementation of getblocktemplate
Go to file
2016-08-11 22:10:53 +00:00
.gitignore Use AM_PROG_AR to support Cygwin 2012-09-29 11:30:14 +00:00
AUTHORS AUTHORS: Add Cory Fields 2016-07-23 21:08:17 +00:00
autogen.sh No longer call configure from autogen.sh 2014-08-22 17:43:04 +00:00
base58.c Revert Segnet support 2016-07-28 03:51:06 +00:00
blkmaker_jansson.c Implement weightlimit 2016-07-26 04:36:22 +00:00
blkmaker_jansson.h Make new BIP 9 features public 2016-05-25 03:55:31 +00:00
blkmaker.c Bugfix: Handle unknown transaction weight by either calculating it (generation only) or ignoring the weightlimit 2016-08-11 22:10:53 +00:00
blkmaker.h Revert Segnet support 2016-07-28 03:51:06 +00:00
blktemplate.c Bugfix: Initialise weightlimit to INT64_MAX 2016-08-11 22:10:52 +00:00
blktemplate.h Implement weightlimit 2016-07-26 04:36:22 +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: Set b58_sha256_impl 2014-09-02 17:13:36 +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 "make example" builds example.c if libgcrypt present 2016-06-22 13:03:18 -07: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
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.