mirror of
https://github.com/mimblewimble/grin.git
synced 2025-05-04 00:01:15 +03:00
Add scaling difficulty field to block http api (#1758)
This commit is contained in:
parent
7290d4b93f
commit
fdd4846f11
1 changed files with 4 additions and 0 deletions
|
@ -503,9 +503,12 @@ pub struct BlockHeaderPrintable {
|
||||||
pub nonce: u64,
|
pub nonce: u64,
|
||||||
/// Size of the cuckoo graph
|
/// Size of the cuckoo graph
|
||||||
pub edge_bits: u8,
|
pub edge_bits: u8,
|
||||||
|
/// Nonces of the cuckoo solution
|
||||||
pub cuckoo_solution: Vec<u64>,
|
pub cuckoo_solution: Vec<u64>,
|
||||||
/// Total accumulated difficulty since genesis block
|
/// Total accumulated difficulty since genesis block
|
||||||
pub total_difficulty: u64,
|
pub total_difficulty: u64,
|
||||||
|
/// Difficulty scaling factor between the different proofs of work
|
||||||
|
pub scaling_difficulty: u32,
|
||||||
/// Total kernel offset since genesis block
|
/// Total kernel offset since genesis block
|
||||||
pub total_kernel_offset: String,
|
pub total_kernel_offset: String,
|
||||||
}
|
}
|
||||||
|
@ -525,6 +528,7 @@ impl BlockHeaderPrintable {
|
||||||
edge_bits: h.pow.edge_bits(),
|
edge_bits: h.pow.edge_bits(),
|
||||||
cuckoo_solution: h.pow.proof.nonces.clone(),
|
cuckoo_solution: h.pow.proof.nonces.clone(),
|
||||||
total_difficulty: h.pow.total_difficulty.to_num(),
|
total_difficulty: h.pow.total_difficulty.to_num(),
|
||||||
|
scaling_difficulty: h.pow.scaling_difficulty,
|
||||||
total_kernel_offset: h.total_kernel_offset.to_hex(),
|
total_kernel_offset: h.total_kernel_offset.to_hex(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue