Skip to content

avoid returning &HashMap on channels_sv2 public APIs #2140

@plebhash

Description

@plebhash

we should avoid returning &HashMap on channels_sv2 public APIs

we're exposing internal representation over public APIs, which makes the crate more prone to breaking changes on the long term, which could be avoidable

originally pointed out by @Shourya742 here: #2139 (comment)

aside from channels_sv2::client::share_accounting::ShareAccounting::get_rejected_shares (introduced via #2139), the methods that currently return &HashMap are:

  • channels_sv2::client::group::GroupChannel::get_future_jobs
  • channels_sv2::client::extended::ExtendedChannel::get_future_jobs
  • channels_sv2::client::extended::ExtendedChannel::get_past_jobs
  • channels_sv2::client::extended::ExtendedChannel::get_stale_jobs
  • channels_sv2::client::standard::StandardChannel::get_future_jobs
  • channels_sv2::client::standard::StandardChannel::get_past_jobs
  • channels_sv2::client::standard::StandardChannel::get_stale_jobs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo 📝

    Status

    Todo 📝

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions