Adding kernel_mmr_size and output_mmr_size to BlockHeaderPrintable (#3329)
This commit is contained in:
@@ -102,8 +102,10 @@ pub trait ForeignRpc: Sync + Send {
|
||||
"edge_bits": 29,
|
||||
"hash": "00000100c54dcb7a9cbb03aaf55da511aca2c98b801ffd45046b3991e4f697f9",
|
||||
"height": 374336,
|
||||
"kernel_mmr_size": 2210914,
|
||||
"kernel_root": "d294e6017b9905b288dc62f6f725c864665391c41da20a18a371e3492c448b88",
|
||||
"nonce": 4715085839955132421,
|
||||
"output_mmr_size": 4092001,
|
||||
"output_root": "12464313f7cd758a7761f65b2837e9b9af62ad4060c97180555bfc7e7e5808fa",
|
||||
"prev_root": "e22090fefaece85df1441e62179af097458e2bdcf600f8629b977470db1b6db1",
|
||||
"previous": "0000015957d92c9e04c6f3aec8c5b9976f3d25f52ff459c630a01a643af4a88c",
|
||||
|
||||
+10
-2
@@ -557,10 +557,14 @@ pub struct BlockHeaderPrintable {
|
||||
pub timestamp: String,
|
||||
/// Merklish root of all the commitments in the TxHashSet
|
||||
pub output_root: String,
|
||||
/// Size of the output MMR
|
||||
pub output_mmr_size: u64,
|
||||
/// Merklish root of all range proofs in the TxHashSet
|
||||
pub range_proof_root: String,
|
||||
/// Merklish root of all transaction kernels in the TxHashSet
|
||||
pub kernel_root: String,
|
||||
/// Size of the kernel MMR
|
||||
pub kernel_mmr_size: u64,
|
||||
/// Nonce increment used to mine this block.
|
||||
pub nonce: u64,
|
||||
/// Size of the cuckoo graph
|
||||
@@ -585,8 +589,10 @@ impl BlockHeaderPrintable {
|
||||
prev_root: header.prev_root.to_hex(),
|
||||
timestamp: header.timestamp.to_rfc3339(),
|
||||
output_root: header.output_root.to_hex(),
|
||||
output_mmr_size: header.output_mmr_size,
|
||||
range_proof_root: header.range_proof_root.to_hex(),
|
||||
kernel_root: header.kernel_root.to_hex(),
|
||||
kernel_mmr_size: header.kernel_mmr_size,
|
||||
nonce: header.pow.nonce,
|
||||
edge_bits: header.pow.edge_bits(),
|
||||
cuckoo_solution: header.pow.proof.nonces.clone(),
|
||||
@@ -733,7 +739,8 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn serialize_output_printable() {
|
||||
let hex_output = "{\
|
||||
let hex_output =
|
||||
"{\
|
||||
\"output_type\":\"Coinbase\",\
|
||||
\"commit\":\"083eafae5d61a85ab07b12e1a51b3918d8e6de11fc6cde641d54af53608aa77b9f\",\
|
||||
\"spent\":false,\
|
||||
@@ -750,7 +757,8 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn serialize_output() {
|
||||
let hex_commit = "{\
|
||||
let hex_commit =
|
||||
"{\
|
||||
\"commit\":\"083eafae5d61a85ab07b12e1a51b3918d8e6de11fc6cde641d54af53608aa77b9f\",\
|
||||
\"height\":0,\
|
||||
\"mmr_index\":0\
|
||||
|
||||
Reference in New Issue
Block a user