I am currently developing on an intranet with other solana developers, and so to run my own test validator I’d need to specify a custom port on local host. However, I am not sure how to specify that on Anchor.toml.
1 Answer
In your Anchor.toml
:
[test.validator]
rpc_port = 1337
https://book.anchor-lang.com/anchor_references/anchor-toml_reference.html#testvalidator
-
thanks! however I still run into the ConnectionError(Protocol(HttparseError(Version))) error. I set my url to 0.0.0.0:1337 Commented Aug 9, 2022 at 13:39
-
-
-
I found out that if I just changed the rpc-port of my validator and have a single validator running on my local network then it works just fine. However, I need to change both the rpc-port and the faucet-port if I want two separate validators running locally. How do I specify faucet port on Anchor toml? I tried faucet_port but it didnt work Commented Aug 19, 2022 at 17:06
-
The documentation says to use
faucet_port
, I'm not sure why it wouldn't work for you. In general, they're just the options that you can pass tosolana-test-validator
. Commented Aug 24, 2022 at 15:12
ConnectionError(Protocol(HttparseError(Version)))