Add cuckoo solution to header API

This commit is contained in:
Ignotus Peverell 2018-07-13 02:20:28 +01:00
parent a45d17257a
commit 42bc03f5f3
No known key found for this signature in database
GPG key ID: 99CD25F39F8F8211

View file

@ -484,6 +484,7 @@ pub struct BlockHeaderPrintable {
pub nonce: u64,
/// Size of the cuckoo graph
pub cuckoo_size: u8,
pub cuckoo_solution: Vec<u64>,
/// Total accumulated difficulty since genesis block
pub total_difficulty: u64,
/// Total kernel offset since genesis block
@ -503,6 +504,7 @@ impl BlockHeaderPrintable {
kernel_root: util::to_hex(h.kernel_root.to_vec()),
nonce: h.nonce,
cuckoo_size: h.pow.cuckoo_sizeshift,
cuckoo_solution: h.pow.nonces.clone(),
total_difficulty: h.total_difficulty.to_num(),
total_kernel_offset: h.total_kernel_offset.to_hex(),
}