Skip to content

Commit

Permalink
blockmanager: remove unused Pause() API
Browse files Browse the repository at this point in the history
  • Loading branch information
dajohi committed Jul 7, 2018
1 parent d052898 commit dc64afc
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions blockmanager.go
Expand Up @@ -242,14 +242,6 @@ type isCurrentMsg struct {
reply chan bool
}

// pauseMsg is a message type to be sent across the message channel for
// pausing the block manager. This effectively provides the caller with
// exclusive access over the manager until a receive is performed on the
// unpause channel.
type pauseMsg struct {
unpause <-chan struct{}
}

// getCurrentTemplateMsg handles a request for the current mining block template.
type getCurrentTemplateMsg struct {
reply chan getCurrentTemplateResponse
Expand Down Expand Up @@ -1811,10 +1803,6 @@ out:
case isCurrentMsg:
msg.reply <- b.current()

case pauseMsg:
// Wait until the sender unpauses the manager.
<-msg.unpause

case getCurrentTemplateMsg:
cur := deepCopyBlockTemplate(b.cachedCurrentTemplate)
msg.reply <- getCurrentTemplateResponse{
Expand Down Expand Up @@ -2417,16 +2405,6 @@ func (b *blockManager) IsCurrent() bool {
return <-reply
}

// Pause pauses the block manager until the returned channel is closed.
//
// Note that while paused, all peer and block processing is halted. The
// message sender should avoid pausing the block manager for long durations.
func (b *blockManager) Pause() chan<- struct{} {
c := make(chan struct{})
b.msgChan <- pauseMsg{c}
return c
}

// TicketPoolValue returns the current value of the total stake in the ticket
// pool.
func (b *blockManager) TicketPoolValue() (dcrutil.Amount, error) {
Expand Down

0 comments on commit dc64afc

Please sign in to comment.