Skip to content

Commit

Permalink
Change default local test-validator address from localhost to 127.0.0…
Browse files Browse the repository at this point in the history
….1 (#2725)
  • Loading branch information
ochaloup authored Dec 11, 2023
1 parent 8bf7f25 commit 61244a8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The minor version will be incremented upon a breaking change and the patch versi
- cli: Display errors if toolchain override restoration fails ([#2700](https://github.com/coral-xyz/anchor/pull/2700)).
- cli: Fix commit based `anchor_version` override ([#2704](https://github.com/coral-xyz/anchor/pull/2704)).
- spl: Fix compilation with `shmem` feature enabled ([#2722](https://github.com/coral-xyz/anchor/pull/2722)).
- cli: Localhost default test validator address changes from `localhost` to `127.0.0.1`, NodeJS 17 IP resolution changes for IPv6 ([#2725](https://github.com/coral-xyz/anchor/pull/2725)).

### Breaking

Expand Down
2 changes: 1 addition & 1 deletion cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3514,7 +3514,7 @@ fn test_validator_rpc_url(test_validator: &Option<TestValidator>) -> String {
validator: Some(validator),
..
}) => format!("http://{}:{}", validator.bind_address, validator.rpc_port),
_ => "http://localhost:8899".to_string(),
_ => "http://127.0.0.1:8899".to_string(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion ts/packages/anchor/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class AnchorProvider implements Provider {
}
opts = opts ?? AnchorProvider.defaultOptions();
const connection = new Connection(
url ?? "http://localhost:8899",
url ?? "http://127.0.0.1:8899",
opts.preflightCommitment
);
const NodeWallet = require("./nodewallet.js").default;
Expand Down

1 comment on commit 61244a8

@vercel
Copy link

@vercel vercel bot commented on 61244a8 Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anchor-docs – ./

anchor-lang.com
anchor-docs-git-master-200ms.vercel.app
anchor-docs-200ms.vercel.app
www.anchor-lang.com

Please sign in to comment.