From 7a8110f33c74fda2149cfb9e48295d3e65fcb9e3 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Wed, 8 Jan 2025 18:35:11 +0100 Subject: [PATCH] Set coinbase version to 2 BIP68 doesn't require transactions to use version 2, but why not. --- cpu-miner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu-miner.c b/cpu-miner.c index ef2fc7672..de03b52ce 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -463,7 +463,7 @@ static bool gbt_work_decode(const json_t *val, struct work *work) } cbvalue = json_is_integer(tmp) ? json_integer_value(tmp) : json_number_value(tmp); cbtx = malloc(256); - le32enc((uint32_t *)cbtx, 1); /* version */ + le32enc((uint32_t *)cbtx, 2); /* version */ cbtx[4] = 1; /* in-counter */ memset(cbtx+5, 0x00, 32); /* prev txout hash */ le32enc((uint32_t *)(cbtx+37), 0xffffffff); /* prev txout index */