2

solana-test-validator is basically a full validator run locally. ProgramTestContext looks more light-weight.
Does testing through ProgramTestContext skip any checks compared to solana-test-validator?

1 Answer 1

3

solana-program-test uses the same runtime as solana-test-validator, with a few differences:

  • solana-program-test gives you a BanksClient rather than an RpcClient, which has a bit less functionality
  • solana-test-validator constantly moves slots forward, whereas ProgramTestContext is locked to a slot until you use warp_to_slot(). This means that you have control over time with ProgramTestContext

As an on-chain program developer, you don't need to worry about any differences between the two, other than these.

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.