Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

RpcServer should support missing params request property #768

@devhawk

Description

@devhawk

Some RPC methods (such as getbestblockhash) don't have any parameters. However, if the caller doesn't include an empty array in the request, ProcessRequestAsync returns an Invalid Request error message.

I recommend updating ProcessRequestAsync to validate the params property is an array if present and pass an empty array into the RPC method if not present

From JSON-RPC 2.0 specification:

params: A Structured value that holds the parameter values to be used during the invocation of the method. This member MAY be omitted.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions