Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

popmd: remove unused 'handle' func and return err in connectBFG #124

Merged
merged 2 commits into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions service/popm/popm.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"encoding/hex"
"errors"
"fmt"
"net/http"
"slices"
"strings"
"sync"
Expand Down Expand Up @@ -663,11 +662,6 @@ func (m *Miner) promRunning() float64 {
return 0
}

func handle(service string, mux *http.ServeMux, pattern string, handler func(http.ResponseWriter, *http.Request)) {
mux.HandleFunc(pattern, handler)
log.Infof("handle (%v): %v", service, pattern)
}

func (m *Miner) handleBFGCallCompletion(parrentCtx context.Context, conn *protocol.Conn, bc bfgCmd) {
log.Tracef("handleBFGCallCompletion")
defer log.Tracef("handleBFGCallCompletion exit")
Expand Down Expand Up @@ -805,7 +799,7 @@ func (m *Miner) connectBFG(pctx context.Context) error {
log.Debugf("Connected to BFG: %s", m.cfg.BFGWSURL)
m.bfgWg.Wait()

return nil
return err
}

func (m *Miner) bfg(ctx context.Context) error {
Expand Down