Suggestion: instead of return codes, return an error.
Since this function is called with `go HandleSignedHeartbeat()`, you can't just store the error in a variable. But you could do something like:
```go
go func() {
    err := HandleSignedHeartbeat()
    if err != nil {
        log.Infoln(err)
    }
}()
```
You could use the same approach in the test suite. I think this is cleaner (and more "idiomatic go") than using a return code.