Skip to content

How to treat additional fields in RPC responses: feature for serde(deny_unknown_fields)? #366

@0xB10C

Description

@0xB10C

I ran into a situation where a getpeerinfo RPC call returned an additional, not-yet-merged last_block_announcement field from bitcoin/bitcoin#27052 in 0xB10C/peer-observer#260 (comment). Since I plan to and do run Bitcoin Core PRs, master, and release candidates, I think this is something I'll hit again in the future.

This happens because this crate uses #[serde(deny_unknown_fields)] to ensure all existing fields are covered (see #241 (comment)). This makes sense to have as a default, but I was wondering if a feature flag to disable this for users would make sense.

edit: an alternative would be for me to run a patched version of this crate and I'd be fine with that, but I was looking for a more general solution

Metadata

Metadata

Assignees

No one assigned

    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