Merge pull request #647 from QuorumEngineering/raft-doc-update

Update Raft doc and log messages
This commit is contained in:
Samer Falah 2019-03-06 15:30:44 -05:00 committed by GitHub
commit d4ff7f1fdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -45,8 +45,8 @@ Let's follow the lifecycle of a typical transaction:
#### on the minter:
3. It reaches the minter, where it's included in the next block (see `mintNewBlock`) via the transaction pool.
4. Block creation triggers a [`NewMinedBlockEvent`](https://godoc.org/github.com/jpmorganchase/quorum/core#NewMinedBlockEvent), which the Raft protocol manager receives via its subscription `minedBlockSub`. The `minedBroadcastLoop` (in raft/handler.go) puts this new block to the `ProtocolManager.proposeC` channel.
5. `serveInternal` is waiting at the other end of the channel. Its job is to RLP-encode blocks and propose them to Raft. Once it flows through Raft, this block will likely become the new head of the blockchain (on all nodes.)
4. Block creation triggers a [`NewMinedBlockEvent`](https://godoc.org/github.com/jpmorganchase/quorum/core#NewMinedBlockEvent), which the Raft protocol manager receives via its subscription `minedBlockSub`. The `minedBroadcastLoop` (in raft/handler.go) puts this new block to the `ProtocolManager.blockProposalC` channel.
5. `serveLocalProposals` is waiting at the other end of the channel. Its job is to RLP-encode blocks and propose them to Raft. Once it flows through Raft, this block will likely become the new head of the blockchain (on all nodes.)
#### on every node:

View File

@ -584,7 +584,7 @@ func (pm *ProtocolManager) serveLocalProposals() {
select {
case block, ok := <-pm.blockProposalC:
if !ok {
log.Info("error: read from proposeC failed")
log.Info("error: read from blockProposalC failed")
return
}
@ -599,7 +599,7 @@ func (pm *ProtocolManager) serveLocalProposals() {
pm.rawNode().Propose(context.TODO(), buffer)
case cc, ok := <-pm.confChangeProposalC:
if !ok {
log.Info("error: read from confChangeC failed")
log.Info("error: read from confChangeProposalC failed")
return
}