mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
Merge pull request #453 from ethersphere/fix_panic
swarm/api: move debug line to avoid panic
This commit is contained in:
commit
8ea9168558
1 changed files with 2 additions and 1 deletions
|
|
@ -321,9 +321,9 @@ func (self *Api) Get(key storage.Key, path string) (reader *storage.LazyChunkRea
|
||||||
|
|
||||||
log.Debug("trie getting entry", "key", key, "path", path)
|
log.Debug("trie getting entry", "key", key, "path", path)
|
||||||
entry, _ := trie.getEntry(path)
|
entry, _ := trie.getEntry(path)
|
||||||
log.Debug("trie got entry", "key", key, "path", path, "entry.Hash", entry.Hash)
|
|
||||||
|
|
||||||
if entry != nil {
|
if entry != nil {
|
||||||
|
log.Debug("trie got entry", "key", key, "path", path, "entry.Hash", entry.Hash)
|
||||||
// we want to be able to serve Mutable Resource Updates transparently using the bzz:// scheme
|
// we want to be able to serve Mutable Resource Updates transparently using the bzz:// scheme
|
||||||
//
|
//
|
||||||
// we use a special manifest hack for this purpose, which is pathless and where the resource root key
|
// we use a special manifest hack for this purpose, which is pathless and where the resource root key
|
||||||
|
|
@ -337,6 +337,7 @@ func (self *Api) Get(key storage.Key, path string) (reader *storage.LazyChunkRea
|
||||||
return nil, entry.ContentType, http.StatusOK, &ErrResourceReturn{entry.Hash}
|
return nil, entry.ContentType, http.StatusOK, &ErrResourceReturn{entry.Hash}
|
||||||
}
|
}
|
||||||
key = common.Hex2Bytes(entry.Hash)
|
key = common.Hex2Bytes(entry.Hash)
|
||||||
|
log.Debug("trie key", "key", key)
|
||||||
status = entry.Status
|
status = entry.Status
|
||||||
if status == http.StatusMultipleChoices {
|
if status == http.StatusMultipleChoices {
|
||||||
apiGetHttp300.Inc(1)
|
apiGetHttp300.Inc(1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue