From 7f06b2de5440a3523594daa2d74cf277c8af89cc Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Mon, 16 Nov 2020 16:56:16 +0100 Subject: added get-proof-by-hash handler tests Ensures that the respective error handling functions are invoked. --- reqres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'reqres.go') diff --git a/reqres.go b/reqres.go index 5013d95..8e1c454 100644 --- a/reqres.go +++ b/reqres.go @@ -113,7 +113,7 @@ func (lp *LogParameters) newGetProofByHashRequest(httpRequest *http.Request) (*G if err != nil { return nil, fmt.Errorf("bad tree_size parameter: %v", err) } - if size < 0 { + if size < 1 { return nil, fmt.Errorf("bad tree_size parameter: negative value") } hash, err := deb64(httpRequest.FormValue("hash")) -- cgit v1.2.3