Make num_hashes mean the num_hashes since the last ID
Before this change, num_hashes meant the number of hashes since the last ID, minus any hashing done on the event data. It made no difference for Tick events, but logged Transaction events with one less hash than actually occurred.
This commit is contained in:
@@ -61,6 +61,7 @@ impl<T: Serialize + Clone + Debug> Logger<T> {
|
||||
pub fn log_event(&mut self, event: Event<T>) -> Result<(), (Entry<T>, ExitReason)> {
|
||||
if let Some(sig) = get_signature(&event) {
|
||||
self.last_id = extend_and_hash(&self.last_id, &sig);
|
||||
self.num_hashes += 1;
|
||||
}
|
||||
let entry = Entry {
|
||||
id: self.last_id,
|
||||
|
Reference in New Issue
Block a user