Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sim-node: validate channel policy and enforce unique scid #201

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

carlaKC
Copy link
Contributor

@carlaKC carlaKC commented Nov 12, 2024

Add some validation to make sure that we get sane channels in, specifically:

  • Policies that have valid max in flight / htlc size (this would be caught by our sanity checks, but this catches it early)
  • No repeated channel ids, this will break other things (and can't be true irl)

Copy link
Collaborator

@bjohnson5 bjohnson5 left a comment

Choose a reason for hiding this comment

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

LGTM! I tested a few invalid channel policies and scids and the correct errors were thrown. Left one totally optional suggestion.

sim-lib/src/sim_node.rs Show resolved Hide resolved
@carlaKC carlaKC force-pushed the validate-scid branch 2 times, most recently from 6d44d3d to 30f6ba4 Compare November 15, 2024 14:13
@carlaKC carlaKC merged commit da0ab44 into bitcoin-dev-project:main Nov 15, 2024
1 check passed
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