Description
Please correct me if I'm wrong.
At record_stage.rs :: fn try_process_signals,
if let Some(entry) = recorder.tick(start_time, tick_duration) { sender.send(entry).or(Err(()))?; }
recorder.rs :: fn tick, it returns
Some(self.record(vec![]))
and at fn record
Entry::new_mut(&mut self.last_hash, &mut self.num_hashes, transactions)
goes to Entry:: fn new_mut,
let entry = Self::new(start_hash, *cur_hashes, transactions);
and reset num_hashes and start_hash
*start_hash = entry.id; *cur_hashes = 0;
At fn new, it calls next_hash
and there,
if !hash_data.is_empty() {
extend_and_hash(&id, &hash_data)
} else if num_hashes != 0 {
hash(&id)
} else {
id
}
hash(&id)
looks like to use for hashing tick event b/c tick event doesn't have data, just num_hashes.
However, when if tick event occurs just after recording entry with txs, tick event will have 0 num_hashes because it always resets after calling Entry::new_mut
. Therefore, tick event couldn't be hashed.
I want you to let me know if I'm mistaken or if this is a bug.