hyperledger-labs / SmartBFT

Implementation of the SmartBFT consensus library (https://arxiv.org/abs/2107.06922)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

View cleanup: do not use decisionChannel both ways

tock-ibm opened this issue · comments

the view thread wants to put a decision in the decide channel, and wait until that decision is delivered to the app. the decision is retrieved from the channel by the controller thread.

option 1:
instead of using the decisionChannel both ways, insert in to the channel an object that has a decision and a future in it. the view thread waits on it, the controller thread marks it done.

option 2: use another channel, say decisionDeliveredChannel interface{}, the view thread reads from it, the controller writes to it.