only include kern_ids in compact block (we can safely omit input and outputs ids) (#670)

This commit is contained in:
Antioch Peverell
2018-01-31 10:23:42 -05:00
committed by GitHub
parent f288a18b0c
commit c75026153c
2 changed files with 5 additions and 52 deletions
+1 -7
View File
@@ -531,10 +531,6 @@ pub struct CompactBlockPrintable {
pub out_full: Vec<OutputPrintable>,
/// Full kernels, specifically coinbase kernel(s)
pub kern_full: Vec<TxKernelPrintable>,
/// Inputs (hex short_ids)
pub in_ids: Vec<String>,
/// Outputs (hex short_ids)
pub out_ids: Vec<String>,
/// Kernels (hex short_ids)
pub kern_ids: Vec<String>,
}
@@ -559,8 +555,6 @@ impl CompactBlockPrintable {
header: BlockHeaderPrintable::from_header(&cb.header),
out_full,
kern_full,
in_ids: cb.in_ids.iter().map(|x| x.to_hex()).collect(),
out_ids: cb.out_ids.iter().map(|x| x.to_hex()).collect(),
kern_ids: cb.kern_ids.iter().map(|x| x.to_hex()).collect(),
}
}
@@ -607,4 +601,4 @@ fn serialize_utxo() {
let deserialized: Utxo = serde_json::from_str(&hex_commit).unwrap();
let serialized = serde_json::to_string(&deserialized).unwrap();
assert_eq!(serialized, hex_commit);
}
}