change mutexes to channels for consensus test