We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
package main import ( "log" "time" "context" "fmt" "github.com/gagliardetto/solana-go/rpc" "golang.org/x/time/rate" ) func main() { cluster := rpc.MainNetBeta rpcClient := rpc.NewWithCustomRPCClient(rpc.NewWithLimiter( cluster.RPC, rate.Every(time.Second), // time frame 5, // limit of requests per time frame )) // Get the recent blockhash: recent, err := rpcClient.GetLatestBlockhash(context.TODO(), rpc.CommitmentFinalized) if err != nil { log.Fatalf("Failed to get latest blockhash: %v", err) } fmt.Printf(" Blockhash: %s\n", recent.Value.Blockhash) fmt.Printf(" LastValidBlockHeight: %d\n", recent.Value.LastValidBlockHeight) }
report error : Failed to get latest blockhash: rpc call getLatestBlockhash() on https://api.mainnet-beta.solana.com: Post "https://api.mainnet-beta.solana.com": read tcp 127.0.0.1:60388->127.0.0.1:33210: read: connection reset by peer
The text was updated successfully, but these errors were encountered:
same problem. did u solve it?
Sorry, something went wrong.
Maybe your IP got blocked? It's public RPC.
No branches or pull requests
report error : Failed to get latest blockhash: rpc call getLatestBlockhash() on https://api.mainnet-beta.solana.com: Post "https://api.mainnet-beta.solana.com": read tcp 127.0.0.1:60388->127.0.0.1:33210: read: connection reset by peer
The text was updated successfully, but these errors were encountered: