Add debug logging on startup to provide size of our leaf_set (aka UTXO set) (#2788)

This commit is contained in:
Antioch Peverell 2019-04-30 20:27:37 +01:00 committed by Ignotus Peverell
parent 6352780d6a
commit b9db129b33
2 changed files with 9 additions and 1 deletions

View file

@ -47,6 +47,14 @@ impl LeafSet {
Bitmap::create()
};
if !bitmap.is_empty() {
debug!(
"bitmap {} pos ({} bytes)",
bitmap.cardinality(),
bitmap.get_serialized_size_in_bytes(),
);
}
Ok(LeafSet {
path: file_path.to_path_buf(),
bitmap_bak: bitmap.clone(),

View file

@ -83,7 +83,7 @@ impl PruneList {
prune_list.init_caches();
if !prune_list.bitmap.is_empty() {
debug!("prune_list: bitmap {} pos ({} bytes), pruned_cache {} pos ({} bytes), shift_cache {}, leaf_shift_cache {}",
debug!("bitmap {} pos ({} bytes), pruned_cache {} pos ({} bytes), shift_cache {}, leaf_shift_cache {}",
prune_list.bitmap.cardinality(),
prune_list.bitmap.get_serialized_size_in_bytes(),
prune_list.pruned_cache.cardinality(),