Skip to content

Commit

Permalink
chore: add more arweave gateway endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoyu committed Nov 24, 2023
1 parent 4d79043 commit d8a0fed
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 27 deletions.
2 changes: 1 addition & 1 deletion provider/arweave/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type client struct {

// Fetch fetches the data of the given hash from arweave network.
func (c *client) Fetch(ctx context.Context, id string) (io.ReadCloser, error) {
// We try to fetch from all endpoints until we get a response (arweave gateways).
// try to fetch from all endpoints until we get a response (arweave gateways).
for _, endpoint := range c.endpointURLs {
response, err := c.fetch(ctx, endpoint, id)
if err == nil {
Expand Down
2 changes: 1 addition & 1 deletion provider/arweave/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package arweave_test

import (
"context"
"github.com/naturalselectionlabs/rss3-node/provider/arweave"
"io"
"sync"
"testing"

"github.com/labstack/gommon/log"
"github.com/naturalselectionlabs/rss3-node/provider/arweave"
"github.com/samber/lo"
"github.com/stretchr/testify/require"
)
Expand Down
20 changes: 15 additions & 5 deletions provider/arweave/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@ const (
EndpointARIO // https://ar-io.dev/
EndpointPermagate // https://permagate.io/
EndpointLove4Src // https://love4src.com/
EndpointBobInstein // https://bobinstein.com
EndpointPie // https://gatewaypie.com
EndpointAleko0o //https://aleko0o.store
EndpointVevivo //https://vevivo.xyz
EndpointFllstck //https://arweave.fllstck.dev
EndpointBobInstein // https://bobinstein.com/
EndpointPie // https://gatewaypie.com/
EndpointAleko0o //https://aleko0o.store/
EndpointVevivo //https://vevivo.xyz/
EndpointSulapan //https://sulapan.com/
EndpointBicem //https://bicem.xyz/
EndpointDilsinay //https://dilsinay.online/
EndpointLostgame //https://lostgame.online/
EndpointKhaldrogo //https://khaldrogo.site/
EndpointDasamuka //https://dasamuka.cloud/
EndpointArendor //https://arendor.xyz/
EndpointVelaryon //https://velaryon.xyz/
EndpointKingsharald //https://kingsharald.xyz/
EndpointMoruehoca //https://moruehoca.online/
EndpointKazazel //https://kazazel.xyz/
)
80 changes: 60 additions & 20 deletions provider/arweave/endpoint_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d8a0fed

Please sign in to comment.