state: implement SignedDataSource on HealthRequest message

This commit is contained in:
Leonard Lyubich 2020-05-11 16:12:49 +03:00
parent df9a04e542
commit ea12eabaf6
2 changed files with 14 additions and 2 deletions

View file

@ -2,14 +2,21 @@ package state
// SignedData returns payload bytes of the request. // SignedData returns payload bytes of the request.
// //
// Always returns empty slice. // Always returns an empty slice.
func (m NetmapRequest) SignedData() ([]byte, error) { func (m NetmapRequest) SignedData() ([]byte, error) {
return make([]byte, 0), nil return make([]byte, 0), nil
} }
// SignedData returns payload bytes of the request. // SignedData returns payload bytes of the request.
// //
// Always returns empty slice. // Always returns an empty slice.
func (m MetricsRequest) SignedData() ([]byte, error) { func (m MetricsRequest) SignedData() ([]byte, error) {
return make([]byte, 0), nil 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
}

View file

@ -32,6 +32,11 @@ func TestRequestSign(t *testing.T) {
return new(MetricsRequest) return new(MetricsRequest)
}, },
}, },
{ // HealthRequest
constructor: func() sigType {
return new(HealthRequest)
},
},
} }
for _, item := range items { for _, item := range items {