Skip to content

Allow getblockfrompeer to use any peer #27652

@kroese

Description

@kroese

Please describe the feature you'd like to see added.

When you use getblockfrompeer you have to specify an index of a specific peer. But it would be much easier if it allowed you to use ANY peer.

For example, if you run a pruned node, and your first peer happens to be also pruned, the call will fail. If the call tried all nodes, until it finds a peer that has the block, it wouldn't require you that implement any logic for that.

Is your feature related to a problem, if so please describe it.

No response

Describe the solution you'd like

The solution would be simple: if you don't specify any index, then try all peers untill you find one that does have block, otherwise fail.

Describe any alternatives you've considered

No response

Please leave any additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions