forked from cerc-io/plugeth
all: use rlp.DecodeBytes instead of rlp.Decode where possible (#27994)
This commit is contained in:
@@ -238,6 +238,8 @@ func Decode(input []byte) (Packet, Pubkey, []byte, error) {
|
||||
default:
|
||||
return nil, fromKey, hash, fmt.Errorf("unknown type: %d", ptype)
|
||||
}
|
||||
// Here we use NewStream to allow for additional data after the first
|
||||
// RLP object (forward-compatibility).
|
||||
s := rlp.NewStream(bytes.NewReader(sigdata[1:]), 0)
|
||||
err = s.Decode(req)
|
||||
return req, fromKey, hash, err
|
||||
|
||||
Reference in New Issue
Block a user