Browse Source

Force CanonicalTime to UTC

fixes issue with vote serialization breaking the signatures
pull/953/head
Ethan Frey 7 years ago
parent
commit
c4860f6c29
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      types/canonical_json.go

+ 4
- 1
types/canonical_json.go View File

@ -113,5 +113,8 @@ func CanonicalHeartbeat(heartbeat *Heartbeat) CanonicalJSONHeartbeat {
}
func CanonicalTime(t time.Time) string {
return t.Format(timeFormat)
// note that sending time over go-wire resets it to
// local time, we need to force UTC here, so the
// signatures match
return t.UTC().Format(timeFormat)
}

Loading…
Cancel
Save