general: snapshot

This commit is contained in:
k
2024-07-18 09:16:18 +02:00
parent fb978211ae
commit 4d23fdef61
14 changed files with 565 additions and 488 deletions

View File

@@ -92,8 +92,13 @@ pub fn parse(
let block_size = block.total_size();
let block_weight = block.weight().to_wu();
let block_vbytes = block.weight().to_vbytes_floor();
let block_interval =
previous_timestamp.map_or(0, |previous_timestamp| timestamp - previous_timestamp);
let block_interval = previous_timestamp.map_or(0, |previous_timestamp| {
if previous_timestamp <= timestamp {
0
} else {
timestamp - previous_timestamp
}
});
states
.date_data_vec