Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe committed Apr 12, 2024
1 parent 9673754 commit 5241123
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion impl/internal/did/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

func TestClient(t *testing.T) {
client, err := NewGatewayClient("http://localhost:8305")
client, err := NewGatewayClient("https://diddht.tbddev.org")

require.NoError(t, err)
require.NotNil(t, client)
Expand Down
3 changes: 3 additions & 0 deletions impl/pkg/service/pkarr.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func (s *PkarrService) PublishPkarr(ctx context.Context, id string, record pkarr
if err = s.cache.Set(id, recordBytes); err != nil {
return err
}
logrus.WithContext(ctx).WithField("record", id).Debug("added pkarr record to cache and db")

// return here and put it in the DHT asynchronously
go func() {
Expand All @@ -119,6 +120,8 @@ func (s *PkarrService) PublishPkarr(ctx context.Context, id string, record pkarr

if _, err = s.dht.Put(putCtx, record.BEP44()); err != nil {
logrus.WithContext(ctx).WithError(err).Errorf("error from dht.Put for record: %s", id)
} else {
logrus.WithContext(ctx).WithField("record", id).Debug("put pkarr record to DHT")
}
}()

Expand Down

0 comments on commit 5241123

Please sign in to comment.