phoreproject / graphene

Phore Synapse working repository
MIT License
13 stars 6 forks source link

GetValidatorInformation should return error on invalid data #86

Open wqking opened 5 years ago

wqking commented 5 years ago

Reproduce:

  1. Create a MempoolRequest.
  2. Set MempoolRequest.LastBlockHash to random hash.
  3. Call a Beacon node's GetValidatorInformation with the request.

The Beacon node will return success. Expect: Beacon should report error because the request type is wrong (it should be GetValidatorRequest, but here is MempoolRequest). This can be reproduced in Python since Python is dynamic type.