diff --git a/crypto/crypto.go b/crypto/crypto.go index effa703d06207a8ecc7f1bfd64152b48fdf83292..d56b9112f7155bbf355078aa8080e5bb79af8817 100644 --- a/crypto/crypto.go +++ b/crypto/crypto.go @@ -92,7 +92,7 @@ func ToECDSAPub(pub []byte) *ecdsa.PublicKey { } func FromECDSAPub(pub *ecdsa.PublicKey) []byte { - if pub == nil { + if pub == nil || pub.X == nil || pub.Y == nil { return nil } return elliptic.Marshal(S256(), pub.X, pub.Y) diff --git a/whisper/whisper.go b/whisper/whisper.go index 76cfe34a47b6f6f6d2c66954f22b8716c5e6ccb8..8eab0825b65ec71d8157cf50e419f59d80836193 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -197,7 +197,7 @@ func (self *Whisper) add(envelope *Envelope) error { go self.postEvent(envelope) } - wlogger.DebugDetailln("added whisper message") + wlogger.DebugDetailf("added whisper envelope %x\n", envelope) return nil }