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

Validation: Do not allow defined activity with zero amount #176

Open
carlaKC opened this issue Mar 25, 2024 · 4 comments
Open

Validation: Do not allow defined activity with zero amount #176

carlaKC opened this issue Mar 25, 2024 · 4 comments
Labels
good first issue Good for newcomers Robustness Changes that improve the robustness of running the simulator
Milestone

Comments

@carlaKC
Copy link
Contributor

carlaKC commented Mar 25, 2024

Currently, we allow zero amount payments to be skipped over to allow for the possibility that our random payment amount generation spits out a zero value every once in an hour.

Right now we don't validate that we're provided with a non-zero defined activity amount, so we'll hit the same check and just endlessly not dispatch payments if we're given a zero value.

We should update validate_activity to disallow zero values.

@carlaKC carlaKC added good first issue Good for newcomers Robustness Changes that improve the robustness of running the simulator labels Mar 25, 2024
@carlaKC carlaKC added this to the V3 milestone Mar 27, 2024
@joseguru
Copy link

joseguru commented Apr 3, 2024

Hey @carlaKC am interested in working on this issue.

@joseguru
Copy link

@carlaKC
On validate_activity function I added validation to check for zero amount_msats.

Screenshot 2024-04-15 at 10 26 11

On running cargo run I get the validation error

Screenshot 2024-04-15 at 10 28 59

Which is fine but it seems to skip on running sim-cli

Screenshot 2024-04-15 at 10 30 12

Is that the expected behaviour?

@carlaKC
Copy link
Contributor Author

carlaKC commented Apr 17, 2024

Which is fine but it seems to skip on running sim-cli

Have you re-installed sim-cli before you test?

@joseguru
Copy link

Which is fine but it seems to skip on running sim-cli

Have you re-installed sim-cli before you test?

That fixed it. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Robustness Changes that improve the robustness of running the simulator
Projects
None yet
Development

No branches or pull requests

2 participants