mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
whisper: bugfix, saving own messages
This commit is contained in:
parent
843c1d9127
commit
b702561e87
1 changed files with 3 additions and 3 deletions
|
|
@ -350,9 +350,6 @@ func (wh *Whisper) runMessageLoop(p *Peer, rw p2p.MsgReadWriter) error {
|
|||
return fmt.Errorf("invalid envelope")
|
||||
}
|
||||
p.mark(envelope)
|
||||
if wh.mailServer != nil {
|
||||
wh.mailServer.Archive(envelope)
|
||||
}
|
||||
}
|
||||
case p2pCode:
|
||||
// peer-to-peer message, sent directly to peer bypassing PoW checks, etc.
|
||||
|
|
@ -454,6 +451,9 @@ func (wh *Whisper) add(envelope *Envelope) error {
|
|||
} else {
|
||||
glog.V(logger.Detail).Infof("cached whisper envelope [%x]: %v\n", envelope.Hash(), envelope)
|
||||
wh.postEvent(envelope, false) // notify the local node about the new message
|
||||
if wh.mailServer != nil {
|
||||
wh.mailServer.Archive(envelope)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue