Added error handling for waku handshake DecodeRLP

This commit is contained in:
Samuel Hawksby-Robinson 2020-04-09 23:47:43 +01:00 committed by Andrea Maria Piana
parent 042ae30f9f
commit a50e35b72d
1 changed files with 3 additions and 0 deletions

View File

@ -171,6 +171,9 @@ loop:
}
key, keyType, err := o.decodeKey(s)
if err != nil {
return fmt.Errorf("key decode failure: %v", err)
}
o.setKeyType(keyType)
// Skip processing if a key does not exist.