diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6289718..63af59d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,6 +55,10 @@ jobs: - name: Run Scripts and Tests env: GOPRIVATE: github.com/OdyseeTeam + IS_TEST: true + SDK_URL: https://api.lbry.tv/api/v1/proxy + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} run: | ./scripts/build.sh ./scripts/lint.sh diff --git a/cmd/test.go b/cmd/test.go index 4036b72..042d610 100644 --- a/cmd/test.go +++ b/cmd/test.go @@ -26,6 +26,7 @@ var testCmd = &cobra.Command{ logrus.Panic(err) } config.InitializeConfiguration(conf) + logrus.Infof("lbry conf: %+v", conf) lbry.Init(conf) tests.Launch() }, diff --git a/server/lbry/validator.go b/server/lbry/validator.go index b7d8843..e7ee426 100644 --- a/server/lbry/validator.go +++ b/server/lbry/validator.go @@ -18,6 +18,7 @@ import ( "github.com/OdyseeTeam/commentron/config" "github.com/OdyseeTeam/commentron/helper" + "github.com/sirupsen/logrus" "github.com/lbryio/lbry.go/v2/extras/errors" "github.com/lbryio/lbry.go/v2/extras/jsonrpc" @@ -40,6 +41,10 @@ func getPublicKeyForChannel(channelClaimID string) ([]byte, error) { } return pk, nil } + if channel == nil { + logrus.Infof("Channel not found for claim id: %s", channelClaimID) + } + logrus.Infof("Channel: %+v", channel) return channel.Value.GetChannel().GetPublicKey(), nil } @@ -256,7 +261,7 @@ type publicKeyInfo struct { PublicKey asn1.BitString } -//why the hell are we reusing code from lbry.go instead of just using lbry.go?? +// why the hell are we reusing code from lbry.go instead of just using lbry.go?? func getPublicKeyFromBytes(pubKeyBytes []byte) (*btcec.PublicKey, error) { if len(pubKeyBytes) == 33 { return btcec.ParsePubKey(pubKeyBytes, btcec.S256()) diff --git a/tests/test.go b/tests/test.go index 420cf03..82875f0 100644 --- a/tests/test.go +++ b/tests/test.go @@ -43,6 +43,8 @@ func listComments() (*commentapi.ListResponse, error) { func createComment(comment string) error { c := commentapi.NewClient(address) + logrus.Infof("Creating comment: %s", comment) + logrus.Infof("Address: %s", address) _, err := c.CommentCreate(commentapi.CreateArgs{ CommentText: comment, ClaimID: "abe3c90453fd481383acb4e3d243e2f4efd43e02",