Skip to content

Commit

Permalink
Remove debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-scherbina committed Aug 5, 2024
1 parent c0b5425 commit b41d260
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 32 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ test:

.PHONY: test-integration
test-integration:
MODE=online go test -v -tags=integration -count=1 ./testing
MODE=offline go test -v -tags=integration -count=1 ./testing
MODE=online go test -v -tags=integration -count=1 ./testing
MODE=offline go test -v -tags=integration ./testing

.PHONY: cover
cover:
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ require (
replace (
// Use the cosmos keyring code
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0

//github.com/coinbase/rosetta-sdk-go => /Users/yevheniishcherbina/go/src/github.com/coinbase/rosetta-sdk-go
// Use cometbft fork of tendermint
github.com/cometbft/cometbft => github.com/kava-labs/cometbft v0.37.4-kava.1
github.com/cometbft/cometbft-db => github.com/kava-labs/cometbft-db v0.9.1-kava.1
Expand Down
1 change: 0 additions & 1 deletion server/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ func NewRouter(config *configuration.Configuration) (http.Handler, error) {
router := services.NewBlockchainRouter(config, client, asserter)

loggedRouter := sdkserver.LoggerMiddleware(router)
//loggedRouter := router
corsRouter := sdkserver.CorsMiddleware(loggedRouter)

return corsRouter, nil
Expand Down
5 changes: 0 additions & 5 deletions services/network_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ package services

import (
"context"
"fmt"

"github.com/kava-labs/rosetta-kava/configuration"
"github.com/kava-labs/rosetta-kava/kava"

Expand Down Expand Up @@ -84,8 +82,6 @@ func (s *NetworkAPIService) NetworkStatus(
ctx context.Context,
request *types.NetworkRequest,
) (*types.NetworkStatusResponse, *types.Error) {
fmt.Printf("rosetta-kava NetworkStatus is called\n")

if s.config.Mode != configuration.Online {
return nil, ErrUnavailableOffline
}
Expand All @@ -97,7 +93,6 @@ func (s *NetworkAPIService) NetworkStatus(
peers,
err := s.client.Status(ctx)
if err != nil {
fmt.Printf("debug(NetworkStatus), err: %v\n", err)
return nil, wrapErr(ErrKava, err)
}

Expand Down
22 changes: 0 additions & 22 deletions testing/retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ package testing

import (
"context"
"fmt"
"math/rand"
"os/exec"
"regexp"
"sync/atomic"
"testing"
Expand All @@ -47,11 +45,6 @@ func TestBlockRetry(t *testing.T) {
}
errChan := make(chan serviceError, numJobs)

cmd := exec.Command("bash", "-c", "lsof | wc -l")
initialLSOFOutput, err := cmd.Output()
_ = initialLSOFOutput
_ = err

var globalReq atomic.Uint64
for i := 0; i < numJobs; i++ {
go func() {
Expand All @@ -75,20 +68,6 @@ func TestBlockRetry(t *testing.T) {
NetworkIdentifier: config.NetworkIdentifier,
},
)
fmt.Printf("###################### BEGIN ##########################\n")
fmt.Printf("err : %v\n", err)
fmt.Printf("rosettaErr : %v\n", rosettaErr)
fmt.Printf("networkStatus: %v\n", networkStatus)
fmt.Printf("req : %v\n", req)
fmt.Printf("globalReq : %v\n", globalReq.Load())
//cmd := exec.Command("bash", "-c", "lsof | wc -l")
//output, err := cmd.Output()
//if err != nil {
// fmt.Printf("lsof err: %v\n", err)
//}
//fmt.Printf("initial LSOF output: %s\n", initialLSOFOutput)
//fmt.Printf(" lsof output: %s\n", output)
fmt.Printf("####################### END #########################\n")

currentBlock := networkStatus.CurrentBlockIdentifier
request := &types.BlockRequest{
Expand All @@ -101,7 +80,6 @@ func TestBlockRetry(t *testing.T) {
_, rosettaErr, err = client.BlockAPI.Block(ctx, request)

if err != nil {
// TODO(yevhenii): skip other errors as well
if lessOrEqualCurrentHeight.MatchString(err.Error()) {
continue
}
Expand Down

0 comments on commit b41d260

Please sign in to comment.