Skip to content

Implement builder interface for SelectorParams. #41

@aagbotemi

Description

@aagbotemi

Building transactions through SelectorParams currently gets no feedback if they accidentally create dust outputs or include multiple OP_RETURN outputs. These mistakes only surface at relay time with opaque node rejections.
Implement a builder interface for SelectorParams that validates target outputs against configurable mempool standardness rules, cathching dust recipients, multiple OP_RETURN outputs, oversized OP_RETURN scripts, and missing required fields at construction time.

Proposed solution
Introduce a SelectorParamsBuilder as a separate type that validates and produces SelectorParams.
The SelectorParams::builder() chains methods and call .build() which validates against a configurable MempoolPolicy struct.

Context
See selector.rs L20–L27

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions