MCPcopy Create free account
hub / github.com/ethstorage/es-node / parseVersionedHashes

Function parseVersionedHashes

ethstorage/archiver/utils.go:88–98  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

86}
87
88func parseVersionedHashes(r *http.Request) ([]common.Hash, *httpError) {
89 query := r.URL.Query()
90 normalizeQueryValues(query)
91 r.URL.RawQuery = query.Encode()
92 rawHashes := r.URL.Query()["versioned_hashes"]
93 hashes := make([]common.Hash, 0, len(rawHashes))
94 for _, raw := range rawHashes {
95 hashes = append(hashes, common.HexToHash(raw))
96 }
97 return hashes, nil
98}
99
100// parseIndices filters out invalid and duplicate blob indices
101func parseIndices(r *http.Request, max int) ([]uint64, *httpError) {

Callers 1

blobsHandlerMethod · 0.85

Calls 1

normalizeQueryValuesFunction · 0.85

Tested by

no test coverage detected