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

all: fix various typos in variable names #425

Merged
merged 5 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
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
16 changes: 8 additions & 8 deletions service/bss/bss.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ func NewServer(cfg *Config) (*Server, error) {
}

// handleRequest is called as a go routine to handle a long lived command.
func (s *Server) handleRequest(parrentCtx context.Context, bws *bssWs, wsid string, requestType string, handler func(ctx context.Context) (any, error)) {
func (s *Server) handleRequest(parentCtx context.Context, bws *bssWs, wsid string, requestType string, handler func(ctx context.Context) (any, error)) {
log.Tracef("handleRequest: %v", bws.addr)
defer log.Tracef("handleRequest exit: %v", bws.addr)

ctx, cancel := context.WithTimeout(parrentCtx, s.requestTimeout)
ctx, cancel := context.WithTimeout(parentCtx, s.requestTimeout)
defer cancel()

select {
Expand Down Expand Up @@ -544,11 +544,11 @@ func (s *Server) handleBFGWebsocketReadUnauth(ctx context.Context, conn *protoco
}
}

func (s *Server) handleBFGCallCompletion(parrentCtx context.Context, conn *protocol.Conn, bc bfgCmd) {
func (s *Server) handleBFGCallCompletion(parentCtx context.Context, conn *protocol.Conn, bc bfgCmd) {
log.Tracef("handleBFGCallCompletion")
defer log.Tracef("handleBFGCallCompletion exit")

ctx, cancel := context.WithTimeout(parrentCtx, s.bfgCallTimeout)
ctx, cancel := context.WithTimeout(parentCtx, s.bfgCallTimeout)
defer cancel()

log.Tracef("handleBFGCallCompletion: %v", spew.Sdump(bc.msg))
Expand Down Expand Up @@ -583,7 +583,7 @@ func (s *Server) handleBFGWebsocketCallUnauth(ctx context.Context, conn *protoco
}
}

func (s *Server) callBFG(parrentCtx context.Context, msg any) (any, error) {
func (s *Server) callBFG(parentCtx context.Context, msg any) (any, error) {
log.Tracef("callBFG %T", msg)
defer log.Tracef("callBFG exit %T", msg)

Expand All @@ -592,7 +592,7 @@ func (s *Server) callBFG(parrentCtx context.Context, msg any) (any, error) {
ch: make(chan any),
}

ctx, cancel := context.WithTimeout(parrentCtx, s.bfgCallTimeout)
ctx, cancel := context.WithTimeout(parentCtx, s.bfgCallTimeout)
defer cancel()

// attempt to send
Expand Down Expand Up @@ -709,7 +709,7 @@ func (s *Server) isBFGConnected() float64 {
return 0
}

func (s *Server) Run(parrentCtx context.Context) error {
func (s *Server) Run(parentCtx context.Context) error {
log.Tracef("Run")
defer log.Tracef("Run exit")

Expand All @@ -718,7 +718,7 @@ func (s *Server) Run(parrentCtx context.Context) error {
}
defer s.testAndSetRunning(false)

ctx, cancel := context.WithCancel(parrentCtx)
ctx, cancel := context.WithCancel(parentCtx)
defer cancel() // just in case

mux := http.NewServeMux()
Expand Down
6 changes: 3 additions & 3 deletions service/popm/popm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ func TestCreateTxTxOutPopTx(t *testing.T) {
t.Fatalf("failed to encode PoP transaction: %v", err)
}

expectexTxOut := btcwire.NewTxOut(0, popTxOpReturn)
diff := deep.Equal(expectexTxOut, btx.TxOut[1])
expectedTxOut := btcwire.NewTxOut(0, popTxOpReturn)
diff := deep.Equal(expectedTxOut, btx.TxOut[1])
if len(diff) != 0 {
t.Fatalf("got unexpected diff %s", diff)
}
Expand Down Expand Up @@ -871,7 +871,7 @@ func TestProcessReceivedInAscOrderOverride(t *testing.T) {
}
}

func TestProcesAllKeystonesIfAble(t *testing.T) {
func TestProcessAllKeystonesIfAble(t *testing.T) {
miner, err := NewMiner(&Config{
BTCPrivateKey: "ebaaedce6af48a03bbfd25e8cd0364140ebaaedce6af48a03bbfd25e8cd03641",
BTCChainName: "testnet3",
Expand Down
2 changes: 1 addition & 1 deletion service/tbc/peermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func (pm *PeerManager) randomPeer(ctx context.Context, slot int) (*rawpeer.RawPe
pm.mtx.Lock()
defer pm.mtx.Unlock()

// Reset caluse
// Reset clause
// log.Infof("good %v bad %v seeds %v", len(pm.good), len(pm.bad), len(pm.seeds))
if len(pm.good) < len(pm.seeds) && len(pm.bad) >= len(pm.seeds) {
// Return an error to make the caller aware that we have reset
Expand Down
2 changes: 1 addition & 1 deletion service/tbc/tbc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func TestDbUpgrade(t *testing.T) {
t.Fatal("expected failure retrieving keystone index hash")
}

// Make sure we get the ecxpected indexkeys from db
// Make sure we get the expected indexkeys from db
hash := s2h("0000000050ff3053ada24e6ad581fa0295297f20a2747d034997ffc899aa931e")
utxobh, err := s.db.BlockHeaderByUtxoIndex(ctx)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion ttl/ttl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func TestTTLDelete(t *testing.T) {
if expired, err := tm.Delete(key); err != nil {
t.Fatal(err)
} else if expired {
t.Fatalf("%v: expired got %v wamted %v", key, expired, false)
t.Fatalf("%v: expired got %v wanted %v", key, expired, false)
}
}

Expand Down