From 366b8bc3586be54314babfe5986b86d25e5c073b Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 11 Aug 2016 05:33:56 +0000 Subject: [PATCH] Bugfix: blkmk_init_generation*: Check cbvalue is known before making a new generation transaction using it Backported from 07ce01f57a2b810ccc1fb3d4bb5f317e13496c72 --- blkmaker.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/blkmaker.c b/blkmaker.c index 228f91b..63e32b8 100644 --- a/blkmaker.c +++ b/blkmaker.c @@ -62,6 +62,12 @@ uint64_t blkmk_init_generation3(blktemplate_t * const tmpl, const void * const s return 0; } + if (!tmpl->cbvalue) { + // TODO: Figure it out from the existing cbtxn + *inout_newcb = false; + return 0; + } + *inout_newcb = true; if (scriptsz >= 0xfd)