mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-15 11:46:11 +00:00
* rpc/jsonrpc/server: return an error in WriteRPCResponseHTTP(Error) (#6204)
instead of panicking
Closes #5529
(cherry picked from commit 00b9524168)
# Conflicts:
# CHANGELOG_PENDING.md
# rpc/jsonrpc/server/http_json_handler.go
# rpc/jsonrpc/server/http_server.go
# rpc/jsonrpc/server/http_server_test.go
# rpc/jsonrpc/server/http_uri_handler.go
* resolve conflicts
* fix linting
* fix conflict
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
This commit is contained in:
co-authored by
Anton Kaliaev
Marko Baricevic
parent
d004a584f8
commit
4e25703d58
@@ -32,9 +32,9 @@ type snapshot struct {
|
||||
func (s *snapshot) Key() snapshotKey {
|
||||
// Hash.Write() never returns an error.
|
||||
hasher := sha256.New()
|
||||
hasher.Write([]byte(fmt.Sprintf("%v:%v:%v", s.Height, s.Format, s.Chunks))) //nolint:errcheck // ignore error
|
||||
hasher.Write(s.Hash) //nolint:errcheck // ignore error
|
||||
hasher.Write(s.Metadata) //nolint:errcheck // ignore error
|
||||
hasher.Write([]byte(fmt.Sprintf("%v:%v:%v", s.Height, s.Format, s.Chunks)))
|
||||
hasher.Write(s.Hash)
|
||||
hasher.Write(s.Metadata)
|
||||
var key snapshotKey
|
||||
copy(key[:], hasher.Sum(nil))
|
||||
return key
|
||||
|
||||
Reference in New Issue
Block a user