Skip to content

channels_sv2::outputs::deserialize_outputs#1934

Merged
plebhash merged 4 commits into
stratum-mining:mainfrom
plebhash:2025-10-02-channels-sv2-deserialize-outputs
Oct 6, 2025
Merged

channels_sv2::outputs::deserialize_outputs#1934
plebhash merged 4 commits into
stratum-mining:mainfrom
plebhash:2025-10-02-channels-sv2-deserialize-outputs

Conversation

@plebhash

@plebhash plebhash commented Oct 2, 2025

Copy link
Copy Markdown
Member

with new roles refactoring we're falling into a pattern of copy-pasting (and effectively duplicating) a lot of "utils" code

#1843 introduced a jd_client::utils::deserialize_coinbase_outputs that is now being copy-pasted into a redundant pool_sv2::utils::deserialize_coinbase_outputs on #1926

this PR introduces a new channels_sv2::outputs::deserialize_outputs to avoid this

the old channels_sv2::template module was renamed into channels_sv2::outputs

This was referenced Oct 2, 2025

@Shourya742 Shourya742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the observation. Ideally, the fix for the other common methods would be to introduce a shared utils module inside roles-utils. What do you think about that?

Comment thread roles/jd-client/src/lib/utils.rs
Comment thread roles/jd-client/src/lib/channel_manager/upstream_message_handler.rs Outdated
@plebhash plebhash force-pushed the 2025-10-02-channels-sv2-deserialize-outputs branch from e898d58 to 0a0cc91 Compare October 3, 2025 14:23

@Shourya742 Shourya742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

`template` module was renamed into `outputs`

a `deserialize_outputs` was added to this module
@plebhash plebhash force-pushed the 2025-10-02-channels-sv2-deserialize-outputs branch from 0a0cc91 to 1116be5 Compare October 6, 2025 12:48
@plebhash plebhash merged commit abcc79d into stratum-mining:main Oct 6, 2025
11 checks passed
@plebhash plebhash deleted the 2025-10-02-channels-sv2-deserialize-outputs branch October 6, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants