bitcoin-dev-project / sim-ln

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

Refactor: Create config struct for simulator #157

Open carlaKC opened 1 year ago

carlaKC commented 1 year ago
  1. Add a SimulationConfig struct that passes all the configuration options to the simulator rather than individual params.
  2. Make log_interval configurable while we're here (currently hard set to 60s)

Started working on this in https://github.com/bitcoin-dev-project/sim-ln/commit/e929a2d6c28687df4b491594dc84c0ae9a1dc208 in #141 but decided to leave for a follow up.

enigbe commented 9 months ago

@carlaKC I started working on this while waiting for a review. Curious about what should rank higher between CLI arguments and values in a conf file.

I think it would be preferable to have CLI arguments override the conf file if they're passed but happy to code it any other way you'd prefer.

carlaKC commented 9 months ago

I think it would be preferable to have CLI arguments override the conf file if they're passed but happy to code it any other way you'd prefer.

I think this makes sense, perhaps with a log warning that a config file value has been overwritten?