mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-16 17:03:46 +00:00
chore: log when put/get local storage
This commit is contained in:
parent
2dd60032f1
commit
e144a53def
1 changed files with 6 additions and 2 deletions
|
|
@ -1501,11 +1501,15 @@ func (p *PortalProtocol) InRange(contentId []byte) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PortalProtocol) Get(contentId []byte) ([]byte, error) {
|
func (p *PortalProtocol) Get(contentId []byte) ([]byte, error) {
|
||||||
return p.storage.Get(contentId)
|
content, err := p.storage.Get(contentId)
|
||||||
|
p.log.Trace("get local storage", "contentId", hexutil.Encode(contentId), "content", hexutil.Encode(content), "err", err)
|
||||||
|
return content, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PortalProtocol) Put(contentId []byte, content []byte) error {
|
func (p *PortalProtocol) Put(contentId []byte, content []byte) error {
|
||||||
return p.storage.Put(contentId, content)
|
err := p.storage.Put(contentId, content)
|
||||||
|
p.log.Trace("put local storage", "contentId", hexutil.Encode(contentId), "content", hexutil.Encode(content), "err", err)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PortalProtocol) GetContent() <-chan *ContentElement {
|
func (p *PortalProtocol) GetContent() <-chan *ContentElement {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue