Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ require (
github.com/cosmos/ibc-apps/modules/rate-limiting/v10 v10.1.0
github.com/cosmos/ibc-go/modules/capability v1.0.1
github.com/cosmos/ibc-go/v10 v10.4.0
github.com/decred/base58 v1.0.6
github.com/ethereum/go-ethereum v1.15.11
github.com/gagliardetto/solana-go v1.13.0
github.com/golang/mock v1.6.0
Expand Down Expand Up @@ -228,7 +227,6 @@ require (
github.com/danieljoos/wincred v1.2.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set v1.8.0 // indirect
github.com/decred/dcrd/crypto/blake256 v1.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
github.com/desertbit/timer v1.0.1 // indirect
github.com/dgraph-io/badger/v4 v4.6.0 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -940,8 +940,6 @@ github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U=
github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4=
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
github.com/decred/base58 v1.0.6 h1:NXndBcO+ubGZORV3EulvqeBcMuQM7doqVGa7pBhMOs4=
github.com/decred/base58 v1.0.6/go.mod h1:KR7Oh9njDPXTagD4P67KJZwroL8jT653u8CffkYqhcQ=
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8=
github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo=
Expand Down
4 changes: 2 additions & 2 deletions universalClient/chains/evm/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func (rc *RPCClient) executeWithFailover(ctx context.Context, operation string,
}

maxAttempts := len(clients)
startIndex := atomic.AddUint64(&rc.index, 1) - 1
var lastErr error
for attempt := 0; attempt < maxAttempts; attempt++ {
if ctx != nil {
Expand All @@ -104,8 +105,7 @@ func (rc *RPCClient) executeWithFailover(ctx context.Context, operation string,
}
}

index := atomic.AddUint64(&rc.index, 1) - 1
client := clients[index%uint64(len(clients))]
client := clients[(startIndex+uint64(attempt))%uint64(len(clients))]

if client == nil {
continue
Expand Down
4 changes: 2 additions & 2 deletions universalClient/chains/svm/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func (rc *RPCClient) executeWithFailover(ctx context.Context, operation string,
}

maxAttempts := len(clients)
startIndex := atomic.AddUint64(&rc.index, 1) - 1
for attempt := 0; attempt < maxAttempts; attempt++ {
if ctx != nil {
select {
Expand All @@ -119,8 +120,7 @@ func (rc *RPCClient) executeWithFailover(ctx context.Context, operation string,
}
}

index := atomic.AddUint64(&rc.index, 1) - 1
client := clients[index%uint64(len(clients))]
client := clients[(startIndex+uint64(attempt))%uint64(len(clients))]

if client == nil {
continue
Expand Down
Loading