From 603db9c3254808d679df1dfa39f50b43c5b46eab Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 11 May 2020 16:15:31 +0300 Subject: [PATCH] state: implement SignedDataSource on DumpRequest message --- state/sign.go | 7 +++++++ state/sign_test.go | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/state/sign.go b/state/sign.go index f2ddd8ef..aaf1a2d3 100644 --- a/state/sign.go +++ b/state/sign.go @@ -20,3 +20,10 @@ func (m MetricsRequest) SignedData() ([]byte, error) { func (m HealthRequest) SignedData() ([]byte, error) { return make([]byte, 0), nil } + +// SignedData returns payload bytes of the request. +// +// Always returns an empty slice. +func (m DumpRequest) SignedData() ([]byte, error) { + return make([]byte, 0), nil +} diff --git a/state/sign_test.go b/state/sign_test.go index b5b49120..cc525bc0 100644 --- a/state/sign_test.go +++ b/state/sign_test.go @@ -37,6 +37,11 @@ func TestRequestSign(t *testing.T) { return new(HealthRequest) }, }, + { // DumpRequest + constructor: func() sigType { + return new(DumpRequest) + }, + }, } for _, item := range items {