From 74f1335bfd98667a107ddd68530492148f41c70c Mon Sep 17 00:00:00 2001 From: jaspervdm Date: Mon, 9 Jul 2018 10:14:04 +0200 Subject: [PATCH] Add cuckoo size to block API (#1232) --- api/src/types.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/src/types.rs b/api/src/types.rs index 19dd464cf..1219e6f13 100644 --- a/api/src/types.rs +++ b/api/src/types.rs @@ -482,6 +482,8 @@ pub struct BlockHeaderPrintable { pub kernel_root: String, /// Nonce increment used to mine this block. pub nonce: u64, + /// Size of the cuckoo graph + pub cuckoo_size: u8, /// Total accumulated difficulty since genesis block pub total_difficulty: u64, /// Total kernel offset since genesis block @@ -500,6 +502,7 @@ impl BlockHeaderPrintable { range_proof_root: util::to_hex(h.range_proof_root.to_vec()), kernel_root: util::to_hex(h.kernel_root.to_vec()), nonce: h.nonce, + cuckoo_size: h.pow.cuckoo_sizeshift, total_difficulty: h.total_difficulty.to_num(), total_kernel_offset: h.total_kernel_offset.to_hex(), }