mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
Minor adjustments.
This commit is contained in:
parent
52be0fb2c2
commit
5c5dc0d61f
1 changed files with 2 additions and 1 deletions
|
|
@ -152,7 +152,7 @@ func handler(w http.ResponseWriter, r *http.Request, dpa *DPA) {
|
||||||
for _, entry := range manifestEntries {
|
for _, entry := range manifestEntries {
|
||||||
if !hashMatcher.MatchString(entry.Hash) {
|
if !hashMatcher.MatchString(entry.Hash) {
|
||||||
// hash is mandatory
|
// hash is mandatory
|
||||||
break MANIFEST_ENTRIES
|
continue MANIFEST_ENTRIES
|
||||||
}
|
}
|
||||||
if entry.Content_type == "" {
|
if entry.Content_type == "" {
|
||||||
// content type defaults to manifest
|
// content type defaults to manifest
|
||||||
|
|
@ -164,6 +164,7 @@ func handler(w http.ResponseWriter, r *http.Request, dpa *DPA) {
|
||||||
}
|
}
|
||||||
pathLen := len(entry.Path)
|
pathLen := len(entry.Path)
|
||||||
if len(path) >= pathLen && path[:pathLen] == entry.Path && prefix <= pathLen {
|
if len(path) >= pathLen && path[:pathLen] == entry.Path && prefix <= pathLen {
|
||||||
|
dpaLogger.Debugf("Swarm: \"%s\" matches \"%s\".", path, entry.Path)
|
||||||
prefix = pathLen
|
prefix = pathLen
|
||||||
key = ethutil.Hex2Bytes(entry.Hash)
|
key = ethutil.Hex2Bytes(entry.Hash)
|
||||||
dpaLogger.Debugf("Swarm: Payload hash %064x", key)
|
dpaLogger.Debugf("Swarm: Payload hash %064x", key)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue