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

keystore.has_keys behaviour should return the indicies found #7285

Open
@rakanalh

Description

@rakanalh

Follow up to the comment here: paritytech/polkadot#1740 (comment)

The behaviour of the has_keys would be slow in cases such as:

https://github.com/paritytech/polkadot/blob/9ce9eccae4faa7935bbca9a4200e0978168a46f9/node/network/availability-distribution/src/lib.rs#L582-L586

where the list of keys is iterated so that the first key found is returned. However, in case of a remote signer, this loop would be quite slow.

has_keys behaviour should be modified so that the index of the first element found is returned so that this index can be used to return the public key.

Metadata

Metadata

Assignees

Labels

I9-optimisationAn enhancement to provide better overall performance in terms of time-to-completion for a task.U2-some_time_soonIssue is worth doing soon.Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coder

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions