Fantom-foundation / lachesis-rs

Lachesis BFT consensus for permission-less networks, in Rust
MIT License
34 stars 5 forks source link

Make Node capable of sharing its current status #10

Closed AgustinCB closed 6 years ago

AgustinCB commented 6 years ago

Node has now a functionality to start listening for messages from other nodes in the network asking from its current status.

In order to this, it was necessary to make Node thread safe.

There're three structures that can be modified by more than one thread at the same time right now:

This PR wraps them into Mutex to make sure that they're safe to share. Now one can safely wrap Node in Arc and share it between threads.

Closes #5