[testing] changing default local test-validator address from localhost to 127.0.0.1 #2725
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm inspired with the change of the solana labs example here solana-labs/example-helloworld#375
From the newer nodejs servers the
localhost
is resolved to ipv6::1
and when I use theAnchorProvider.env()
then theANCHOR_PROVIDER_URL
byanchor test
is setup tohttp://localhost:8899
.But the test validator is running on ipv4 as far as I can see.
When I want to use a new instance of
Connection
that's created with theprovider.connection.rpcEndpoint
then I'm getting errors likeError: failed to get recent blockhash: TypeError: fetch failed
.Would that be reasonable to change the default local connection url to test validator from localhost to 127.0.0.1?