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

fix: simplify announce address #48

Merged
merged 1 commit into from
Nov 26, 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 pkg/aws/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/ssm"
"github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/redis/go-redis/v9"
"github.com/storacha/go-metadata"
"github.com/storacha/go-ucanto/did"
Expand Down Expand Up @@ -96,12 +95,7 @@
ipniStoreKeyPrefix = "ipni/v1/ad/"
}

peer, err := peer.IDFromPrivateKey(cryptoPrivKey)
if err != nil {
panic(fmt.Errorf("parsing private key to peer: %w", err))
}

ipniPublisherAnnounceAddress := fmt.Sprintf("/dns4/%s/tcp/443/https/p2p/%s", mustGetEnv("IPNI_STORE_BUCKET_REGIONAL_DOMAIN"), peer.String())
ipniPublisherAnnounceAddress := fmt.Sprintf("/dns/%s/https", mustGetEnv("IPNI_STORE_BUCKET_REGIONAL_DOMAIN"))

Check warning on line 98 in pkg/aws/service.go

View check run for this annotation

Codecov / codecov/patch

pkg/aws/service.go#L98

Added line #L98 was not covered by tests
return Config{
Config: awsConfig,
Signer: id,
Expand Down