Skip to content

refactor: split HopDescriptor into descriptor and SimulatedHop#235

Merged
tamaralipows merged 2 commits into
mainfrom
split-routing/tnl/hop-descriptor-amounts
Jun 5, 2026
Merged

refactor: split HopDescriptor into descriptor and SimulatedHop#235
tamaralipows merged 2 commits into
mainfrom
split-routing/tnl/hop-descriptor-amounts

Conversation

@tamaralipows
Copy link
Copy Markdown
Contributor

Separates simulation results (amount_out, gas) from the hop topology (component_id, token_in, token_out). This makes it clear at the type level which functions need simulation data and which only need routing descriptors, and eliminates the Option unwrapping that was needed when both lived on the same struct.

@tamaralipows tamaralipows force-pushed the split-routing/tnl/hop-descriptor-amounts branch from aad6795 to 95d07ef Compare June 4, 2026 14:31
@tamaralipows tamaralipows self-assigned this Jun 4, 2026
Copy link
Copy Markdown
Collaborator

@louise-poole louise-poole left a comment

Choose a reason for hiding this comment

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

YESSS!! A thing of beauty 😍

Copy link
Copy Markdown
Collaborator

@dianacarvalho1 dianacarvalho1 left a comment

Choose a reason for hiding this comment

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

🧹 🧹 💅🏼 💅🏼 thank you @tamaralipows!

@tamaralipows tamaralipows force-pushed the split-routing/tnl/hop-descriptor-amounts branch from 95d07ef to 916af5b Compare June 5, 2026 13:56
@tamaralipows tamaralipows enabled auto-merge June 5, 2026 13:56
tamaralipows and others added 2 commits June 5, 2026 10:16
…rapper

Separates simulation results (amount_out, gas) from the hop topology
(component_id, token_in, token_out). This makes it clear at the type
level which functions need simulation data and which only need routing
descriptors, and eliminates the Option unwrapping that was needed when
both lived on the same struct.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Clone derive to SimulatedHop, fix field access through
descriptor in validate_token_cycles, add test helper
with_amounts, and regenerate OpenAPI spec.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tamaralipows tamaralipows force-pushed the split-routing/tnl/hop-descriptor-amounts branch from c6d43fe to aa9a0c4 Compare June 5, 2026 14:16
@tamaralipows tamaralipows merged commit a4ed8c1 into main Jun 5, 2026
15 checks passed
@tamaralipows tamaralipows deleted the split-routing/tnl/hop-descriptor-amounts branch June 5, 2026 14:18
@propellerci
Copy link
Copy Markdown

propellerci Bot commented Jun 5, 2026

This PR is included in version 0.75.3 🎉

@propellerci propellerci Bot added the true label Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants