When a mixing message (implementing the WriteHash(hash.Hash) method) is read from another peer, it is improper to use its Hash() method before calculating and storing the hash using WriteHash. Do this as early as possible in readMessage in the peer package. This avoids the need for callers to remember to do this step manually in the OnMix* callbacks.
When a mixing message (implementing the WriteHash(hash.Hash) method) is read from another peer, it is improper to use its Hash() method before calculating and storing the hash using WriteHash. Do this as early as possible in readMessage in the peer package. This avoids the need for callers to remember to do this step manually in the OnMix* callbacks.