bitcoin-dev-project / sim-ln

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

Issue #168: Adding optional start and count values to sim.json file #173

Closed bjohnson5 closed 8 months ago

bjohnson5 commented 8 months ago

Adding start and count options to the sim.json file.

start: Specifies when in the simulation the user wants this activity to start (for example... start sending payments at 10s) count: Specifies the number of payments to send throughout the simulation (for example... send 15 payments and then stop)

Resolves #168

carlaKC commented 8 months ago

Missed that this is ready for a look - will give it a pass soon!

bjohnson5 commented 8 months ago

@enigbe Thanks for the review! I added some details to the README about the new start_secs and count fields. Let me know if there is anywhere else you think this should be documented.

I think leaving the field name as start_secs makes sense for consistency and clarity. Open to your thoughts on that though, let me know if you have a better name in mind.

carlaKC commented 8 months ago

Also happy to go ahead with merge and add this shutdown handling in a followup @bjohnson5 if that's going to make your life easier, since you're the primary consumer of this feature rn :)

bjohnson5 commented 8 months ago

@carlaKC I think that your suggestion for shutting down the simulation if all producers finish makes sense. I added a separate JoinSet for the producers and a new task that will trigger the shutdown if all the producer threads complete. @enigbe I would love to get you to review that new change if you have time, since you just worked on the shutdown process.

I also addressed the other review comments. Thanks!

carlaKC commented 8 months ago

LGTM - will merge when CI's done ✅