1

Sorry for the noob question.

Im trying to test a program that I deployed locally, however when running anchor run test, I receive the following error.

Error: failed to get recent blockhash: FetchError: request to http://localhost:8899/ failed, reason: connect ECONNREFUSED ::1:8899

Ive verified solana-test-validator is running, and I can airdrop lamports no problem. Additionally, I'll see the logs from bpf loader when deploying the program.

Anchor.toml checks out I believe. Pasted in the programid already. Same with declare_id! in lib.rs.

I honestly have no clue, any help would be soo appreciated!

1 Answer 1

1

If you're using anchor with local validator and not it's own validator, you need to pass in the --skip-local-validator option like so:

anchor test --skip-local-validator

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.