At Record Stage, it seems there is possibility about not hashing when tick event. #407
Labels
question
Add this to close an issue with instructions on how to repost as a question on Stack Exchange
Milestone
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,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.
The text was updated successfully, but these errors were encountered: