mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-31 09:03:46 +00:00
swarm/pss: added msg to log, cleared lock error
This commit is contained in:
parent
4cb8412cd0
commit
a009ee3d39
1 changed files with 2 additions and 4 deletions
|
|
@ -131,8 +131,6 @@ func (self *Pss) Protocols() []p2p.Protocol {
|
|||
|
||||
// Starts the PssMsg protocol
|
||||
func (self *Pss) Run(p *p2p.Peer, rw p2p.MsgReadWriter) error {
|
||||
self.lock.Lock()
|
||||
defer self.lock.Unlock()
|
||||
pp := protocols.NewPeer(p, rw, pssSpec)
|
||||
//addr := network.NewAddrFromNodeID(id)
|
||||
//potaddr := pot.NewHashAddressFromBytes(addr.OAddr)
|
||||
|
|
@ -326,8 +324,8 @@ func (self *Pss) Forward(msg *PssMsg) error {
|
|||
log.Crit("Pss cannot use kademlia peer type")
|
||||
return false
|
||||
}
|
||||
//sendMsg := fmt.Sprintf("MSG %x TO %x FROM %x VIA %x", digest, common.ByteLabel(msg.To), common.ByteLabel(self.BaseAddr()), common.ByteLabel(op.Address()))
|
||||
sendMsg := fmt.Sprintf("TO %x FROM %x VIA %x", common.ByteLabel(msg.To), common.ByteLabel(self.BaseAddr()), common.ByteLabel(op.Address()))
|
||||
sendMsg := fmt.Sprintf("MSG %x TO %x FROM %x VIA %x", digest, common.ByteLabel(msg.To), common.ByteLabel(self.BaseAddr()), common.ByteLabel(op.Address()))
|
||||
//sendMsg := fmt.Sprintf("TO %x FROM %x VIA %x", common.ByteLabel(msg.To), common.ByteLabel(self.BaseAddr()), common.ByteLabel(op.Address()))
|
||||
pp := self.fwdPool[sp.ID()]
|
||||
if self.checkFwdCache(op.Address(), digest) {
|
||||
log.Info(fmt.Sprintf("%v: peer already forwarded to", sendMsg))
|
||||
|
|
|
|||
Loading…
Reference in a new issue