Merge branch '0.4.x'

Conflicts:
	blkmaker.h
This commit is contained in:
Luke Dashjr
2015-02-08 05:45:52 +00:00
2 changed files with 3 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ extern "C" {
#endif
#define BLKMAKER_VERSION (6L)
#define BLKMAKER_MAX_BLOCK_VERSION (2)
#define BLKMAKER_MAX_BLOCK_VERSION (3)
extern bool (*blkmk_sha256_impl)(void *hash_out, const void *data, size_t datasz);

View File

@@ -263,10 +263,10 @@ const char *blktmpl_add_jansson(blktemplate_t *tmpl, const json_t *json, time_t
}
}
if (tmpl->version > 2 || (tmpl->version == 2 && !tmpl->height))
if (tmpl->version > BLKMAKER_MAX_BLOCK_VERSION || (tmpl->version >= 2 && !tmpl->height))
{
if (tmpl->mutations & BMM_VERDROP)
tmpl->version = tmpl->height ? 2 : 1;
tmpl->version = tmpl->height ? BLKMAKER_MAX_BLOCK_VERSION : 1;
else
if (!(tmpl->mutations & BMM_VERFORCE))
return "Unrecognized block version, and not allowed to reduce or force it";