mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
add log to netstore.put
This commit is contained in:
parent
d228901f4c
commit
e574002c3e
1 changed files with 2 additions and 3 deletions
|
|
@ -69,8 +69,9 @@ func (self *NetStore) Put(entry *Chunk) {
|
||||||
func (self *NetStore) put(entry *Chunk) {
|
func (self *NetStore) put(entry *Chunk) {
|
||||||
self.localStore.Put(entry)
|
self.localStore.Put(entry)
|
||||||
dpaLogger.Debugf("NetStore.put: localStore.Put of %064x completed.", entry.Key)
|
dpaLogger.Debugf("NetStore.put: localStore.Put of %064x completed.", entry.Key)
|
||||||
self.store(entry)
|
go self.store(entry)
|
||||||
// only send responses once
|
// only send responses once
|
||||||
|
dpaLogger.Debugf("NetStore.put: req: %#v", entry.Key)
|
||||||
if entry.req != nil && entry.req.status == reqSearching {
|
if entry.req != nil && entry.req.status == reqSearching {
|
||||||
entry.req.status = reqFound
|
entry.req.status = reqFound
|
||||||
close(entry.req.C)
|
close(entry.req.C)
|
||||||
|
|
@ -157,8 +158,6 @@ func (self *NetStore) addRetrieveRequest(req *retrieveRequestMsgData) {
|
||||||
|
|
||||||
send, timeout := self.strategyUpdateRequest(chunk.req, req) // may change req status
|
send, timeout := self.strategyUpdateRequest(chunk.req, req) // may change req status
|
||||||
|
|
||||||
dpaLogger.Debugf("Is %v == %v?", send, storeRequestMsg)
|
|
||||||
|
|
||||||
if send == storeRequestMsg {
|
if send == storeRequestMsg {
|
||||||
dpaLogger.Debugf("NetStore.addRetrieveRequest: %064x - content found, delivering...", req.Key)
|
dpaLogger.Debugf("NetStore.addRetrieveRequest: %064x - content found, delivering...", req.Key)
|
||||||
self.deliver(req, chunk)
|
self.deliver(req, chunk)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue