Siacoin/Sia — pull request #82 by DavidVorick (2014-04-20 19:20:06+00:00)
Title: Fix Concurrency Issues

Our build is failing, and this PR fixes that. Nonetheless, it's a bit premature because some of the solutions are gross, and there are a bunch of other in-progress changes that are happening.

Highlights:

+ add package 'test', which tests all the components working in concert.
+ 'main' no longer causes panics
+ 'node' was revamped a bit, can send files, and is now thread safe
+ a bunch of public functions and types from package quorum are now private
+ quorum is now thread safe

Unhighlights:

- some of the tests are now more cobbled together than make-sense. As I kept changing things I just updated the tests so that they'd keep working. They need a once-over
- before the tests get a once-over, I need to finish making the private state variables private. There are some that are still public because I need to implement a few new public functions before I privatize the old ones (namely, I need to add a function that allows a participant to join an existing quorum)
- the main doesn't do anything. It didn't used to do anything either, but it still doesn't do anything.
- I used a state-wide lock to make quorums thread safe. This is silly, and not needed. Individual components of the state should be locked individually. Since we need to get a demo finished, I think that's going to have to wait until after next week.