bitcoin-dev-project / sim-ln

Payment activity generator for the lightning network
MIT License
63 stars 28 forks source link

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

Open carlaKC opened 8 months ago

carlaKC commented 8 months ago

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.

joseguru commented 8 months ago

Hey @carlaKC am interested in working on this issue.

joseguru commented 7 months ago

@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 commented 7 months ago

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

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

joseguru commented 7 months ago

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