rust-bitcoin / rust-bitcoin/rust-miniscript

We shouldn't implement `AssetProvider` for `T: Satisfier`

Open
#850 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
426
Forks
200
Avg merge
7d 17h
Merged PRs (30d)
8

Description

If you have a satisfier, you should just call descriptor.satisfy() with it. There's no reason to call .plan() except if you have some extra knowledge about which keys are available (or not available) and want to save calls to your satisfier.

If you have a T: Satisfier and call descriptor.plan().satisfy() with it, you get the same result as if you'd called descriptor.satisfy() except that you lookup all your signatures twice.

cc @afilini

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the AssetProvider implementation for T: Satisfier and the descriptor.satisfy() and descriptor.plan().satisfy() entry points. Compare their signature lookup behavior and inspect any related tests; done means the redundant implementation or path is removed without changing satisfaction results or causing duplicate lookups.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.