Skip to content

Commit

Permalink
replica: add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
divyakoshy committed Jun 19, 2019
1 parent 1a2ef31 commit a50f3e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions replica/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,19 @@ func (replica *replica) SyncCommit(commit block.Commit) bool {
func (replica *replica) Transition(transition state.Transition) {
for ok := true; ok; transition, ok = replica.transitionBuffer.Dequeue(replica.stateMachine.Height()) {
if replica.shouldDropTransition(transition) {
fmt.Println("dropping transition")
continue
}

if !replica.isTransitionValid(transition) {
fmt.Println("invalid transition")
continue
}

// If a `Proposed` is seen for a higher round, buffer and return immediately
if replica.shouldBufferTransition(transition) {
replica.transitionBuffer.Enqueue(transition)
fmt.Println("buffering transition")
return
}

Expand Down

0 comments on commit a50f3e6

Please sign in to comment.