ZenGo-X / round-based-protocol

Driver for round-based protocols in Rust
Apache License 2.0
23 stars 17 forks source link

Simulation prints a lot of stuff into stdout #5

Closed DmytroTym closed 3 years ago

DmytroTym commented 3 years ago

In simulation.rs, methods proceed_if_needed and handle_incoming print a lot, especially if the number of parties is large. This is done via println! and thus not very configurable, complicating debug, testing and benchmarking. Maybe we can use info! or debug! instead? I can make a PR for this

survived commented 3 years ago

You're right, it's quite inconvenient. We're currently working on major revision of this crate, and a new simulation already has no printing. However, if you'd like to fix current version, PR is more than welcome!

DmytroTym commented 3 years ago

I did a quick PR, changing printins to debugs: https://github.com/ZenGo-X/round-based-protocol/pull/6 I now see the limitations of this approach: it's pretty hard to set log level in tests :( Still, maybe it works as a temporary measure?

survived commented 3 years ago

@DmytroTym a new version with your changes is published!