diff options
author | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-11-24 20:34:51 +0100 |
---|---|---|
committer | Rasmus Dahlberg <rasmus.dahlberg@kau.se> | 2020-11-24 20:34:51 +0100 |
commit | 57cbb3ca933b3f9e7bb3552cf3777b4a86239d13 (patch) | |
tree | 3939abc7632d2e2b3b39ad9dcf6e9bd7a5cb0b76 /handler.go | |
parent | b2e10535ef094e8bc9995769c2a22a1ee29cbe57 (diff) |
added isolated trillian proof tests
Diffstat (limited to 'handler.go')
-rw-r--r-- | handler.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -134,8 +134,8 @@ func getProofByHash(ctx context.Context, i *Instance, w http.ResponseWriter, r * TreeSize: req.TreeSize, OrderBySequence: true, }) - if status, errInner := checkGetInclusionProofByHash(i.LogParameters, trsp, err); errInner != nil { - return status, fmt.Errorf("bad GetInclusionProofByHashResponse: %v", errInner) + if errInner := checkGetInclusionProofByHash(i.LogParameters, trsp, err); errInner != nil { + return http.StatusInternalServerError, fmt.Errorf("bad GetInclusionProofByHashResponse: %v", errInner) } rsp, err := NewInclusionProofV1(i.LogParameters.LogId, uint64(req.TreeSize), uint64(trsp.Proof[0].LeafIndex), trsp.Proof[0].Hashes).MarshalB64() @@ -161,8 +161,8 @@ func getConsistencyProof(ctx context.Context, i *Instance, w http.ResponseWriter FirstTreeSize: int64(req.First), SecondTreeSize: int64(req.Second), }) - if status, errInner := checkGetConsistencyProof(i.LogParameters, trsp, err); errInner != nil { - return status, fmt.Errorf("bad GetConsistencyProofResponse: %v", errInner) + if errInner := checkGetConsistencyProof(i.LogParameters, trsp, err); errInner != nil { + return http.StatusInternalServerError, fmt.Errorf("bad GetConsistencyProofResponse: %v", errInner) } rsp, err := NewConsistencyProofV1(i.LogParameters.LogId, uint64(req.First), uint64(req.Second), trsp.Proof.Hashes).MarshalB64() |