Skip to content

Commit

Permalink
Initialize Events Channel on FastHotStuffEventLoopConstructor
Browse files Browse the repository at this point in the history
  • Loading branch information
tholonious committed Jan 25, 2024
1 parent 78e8270 commit 44a4c60
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions consensus/event_loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func NewFastHotStuffEventLoop() *fastHotStuffEventLoop {
status: eventLoopStatusNotInitialized,
crankTimerTask: NewScheduledTask[uint64](),
nextTimeoutTask: NewScheduledTask[uint64](),
Events: make(chan *FastHotStuffEvent, signalChannelBufferSize),
}
}

Expand Down Expand Up @@ -80,9 +81,6 @@ func (fc *fastHotStuffEventLoop) Init(
fc.votesSeenByBlockHash = make(map[BlockHashValue]map[string]VoteMessage)
fc.timeoutsSeenByView = make(map[uint64]map[string]TimeoutMessage)

// Reset the external channel used for signaling
fc.Events = make(chan *FastHotStuffEvent, signalChannelBufferSize)

// Set the crank timer interval and timeout base duration
fc.crankTimerInterval = crankTimerInterval
fc.timeoutBaseDuration = timeoutBaseDuration
Expand Down

0 comments on commit 44a4c60

Please sign in to comment.