cashubtc / cdk

Cashu Development Kit
MIT License
87 stars 44 forks source link

Mintd fake wallet: get payment delay from config #443

Closed thesimplekid closed 2 weeks ago

thesimplekid commented 2 weeks ago

We should allow the payment delay in fake wallet to be configurable. It maybe better to be a range, min and max and choose a random delay between those to to more closely simulate real payments.

https://github.com/cashubtc/cdk/blob/0523892b4db55cedaca59e7e14cc955251357fae/crates/cdk-mintd/src/setup.rs#L224

mubarak23 commented 2 weeks ago

I can take and work on this

mubarak23 commented 2 weeks ago

@thesimplekid the setup should collect min and max value, then we choose a random median average value from them.

mubarak23 commented 2 weeks ago

@thesimplekid the setup should collect min and max value, then we choose a random median average value from them.

instead of this. we can generate two random unique value, and get their average

thesimplekid commented 2 weeks ago

instead of this. we can generate two random unique value, and get their average

I think we still want it in the config, For some testing we may want this to be configurable. So i think the range from the config and then a random number between those is the best