diff --git a/src/entry.rs b/src/entry.rs index 67a6ea7ae8689d..5c6bb240cd55cc 100644 --- a/src/entry.rs +++ b/src/entry.rs @@ -40,6 +40,8 @@ pub fn next_hash(start_hash: &Hash, num_hashes: u64, event: &Event) -> Hash { id = hash(&id); } if let Some(sig) = sig { + // TODO: Also hash the event type. Only the signature of a single type is + // guaranteed to be unique. id = extend_and_hash(&id, &sig); } id diff --git a/src/event.rs b/src/event.rs index 0d6642b3f31156..d94f9adf33681b 100644 --- a/src/event.rs +++ b/src/event.rs @@ -37,13 +37,12 @@ impl Event { } } - // TODO: Rename this to transaction_signature(). pub fn get_signature(&self) -> Option { match *self { Event::Tick => None, Event::Transaction(ref tr) => Some(tr.sig), - Event::Signature { .. } => None, - Event::Timestamp { .. } => None, + Event::Signature { sig, .. } => Some(sig), + Event::Timestamp { sig, .. } => Some(sig), } }