Add usage of "maxversion" request, and update capability enum for version/* mutations
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <blktemplate.h>
|
||||
|
||||
#define BLKMAKER_VERSION (0L)
|
||||
#define BLKMAKER_MAX_BLOCK_VERSION (2)
|
||||
|
||||
extern bool (*blkmk_sha256_impl)(void *hash_out, const void *data, size_t datasz);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <jansson.h>
|
||||
|
||||
#include <blkmaker.h>
|
||||
#include <blktemplate.h>
|
||||
|
||||
#ifndef JSON_INTEGER_IS_LONG_LONG
|
||||
@@ -38,6 +39,10 @@ json_t *blktmpl_request_jansson(gbt_capabilities_t caps) {
|
||||
if (json_object_set_new(req, "capabilities", jcaps))
|
||||
goto err;
|
||||
jcaps = NULL;
|
||||
if (!(jstr = json_integer(BLKMAKER_MAX_BLOCK_VERSION)))
|
||||
goto err;
|
||||
if (json_object_set_new(req, "maxversion", jstr))
|
||||
goto err;
|
||||
if (json_object_set_new(reqf, "id", jstr))
|
||||
goto err;
|
||||
if (!(jstr = json_string("getblocktemplate")))
|
||||
|
||||
@@ -50,16 +50,18 @@ typedef enum {
|
||||
BMM_TIMEDEC = 1 << 0x14,
|
||||
BMM_TXNADD = 1 << 0x15,
|
||||
BMM_PREVBLK = 1 << 0x16,
|
||||
BMM_VERFORCE = 1 << 0x17,
|
||||
BMM_VERDROP = 1 << 0x18,
|
||||
|
||||
// BIP 23: Submission Abbreviation
|
||||
BMA_TXNHASH = 1 << 0x18,
|
||||
BMAb_COINBASE = 1 << 0x19,
|
||||
BMAb_TRUNCATE = 1 << 0x1a,
|
||||
BMAs_COINBASE = 1 << 0x1b,
|
||||
BMAs_MERKLE = 1 << 0x1c,
|
||||
BMAs_TRUNCATE = 1 << 0x1d,
|
||||
BMA_TXNHASH = 1 << 0x19,
|
||||
BMAb_COINBASE = 1 << 0x1a,
|
||||
BMAb_TRUNCATE = 1 << 0x1b,
|
||||
BMAs_COINBASE = 1 << 0x1c,
|
||||
BMAs_MERKLE = 1 << 0x1d,
|
||||
BMAs_TRUNCATE = 1 << 0x1e,
|
||||
} gbt_capabilities_t;
|
||||
#define GBT_CAPABILITY_COUNT (0x1e)
|
||||
#define GBT_CAPABILITY_COUNT (0x1f)
|
||||
|
||||
extern const char *blktmpl_capabilityname(gbt_capabilities_t);
|
||||
#define BLKTMPL_LONGEST_CAPABILITY_NAME (16)
|
||||
|
||||
Reference in New Issue
Block a user