whisper: change the whisper message format so as to add the payload size (#15870)
* whisper: message format changed * whisper: tests fixed * whisper: style fixes * whisper: fixed names, fixed failing tests * whisper: fix merge issue in #15870 Occured while using the github online merge tool. Lesson learned. * whisper: fix a gofmt error for #15870
This commit is contained in:
@@ -200,8 +200,7 @@ func (e *Envelope) OpenSymmetric(key []byte) (msg *ReceivedMessage, err error) {
|
||||
|
||||
// Open tries to decrypt an envelope, and populates the message fields in case of success.
|
||||
func (e *Envelope) Open(watcher *Filter) (msg *ReceivedMessage) {
|
||||
// The API interface forbids filters doing both symmetric and
|
||||
// asymmetric encryption.
|
||||
// The API interface forbids filters doing both symmetric and asymmetric encryption.
|
||||
if watcher.expectsAsymmetricEncryption() && watcher.expectsSymmetricEncryption() {
|
||||
return nil
|
||||
}
|
||||
@@ -219,7 +218,7 @@ func (e *Envelope) Open(watcher *Filter) (msg *ReceivedMessage) {
|
||||
}
|
||||
|
||||
if msg != nil {
|
||||
ok := msg.Validate()
|
||||
ok := msg.ValidateAndParse()
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user