From ea12eabaf6ec0f2f081f927b0df56c5ba4883284 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 11 May 2020 16:12:49 +0300 Subject: [PATCH] state: implement SignedDataSource on HealthRequest message --- state/sign.go | 11 +++++++++-- state/sign_test.go | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/state/sign.go b/state/sign.go index 47edada..f2ddd8e 100644 --- a/state/sign.go +++ b/state/sign.go @@ -2,14 +2,21 @@ package state // SignedData returns payload bytes of the request. // -// Always returns empty slice. +// Always returns an empty slice. func (m NetmapRequest) SignedData() ([]byte, error) { return make([]byte, 0), nil } // SignedData returns payload bytes of the request. // -// Always returns empty slice. +// Always returns an empty slice. func (m MetricsRequest) SignedData() ([]byte, error) { return make([]byte, 0), nil } + +// SignedData returns payload bytes of the request. +// +// Always returns an empty slice. +func (m HealthRequest) SignedData() ([]byte, error) { + return make([]byte, 0), nil +} diff --git a/state/sign_test.go b/state/sign_test.go index 2e8da40..b5b4912 100644 --- a/state/sign_test.go +++ b/state/sign_test.go @@ -32,6 +32,11 @@ func TestRequestSign(t *testing.T) { return new(MetricsRequest) }, }, + { // HealthRequest + constructor: func() sigType { + return new(HealthRequest) + }, + }, } for _, item := range items {