Closed AuroraLantean closed 1 year ago
There is a method to do this. I think it's warp_to_slot or something.
Not sure if you can interact with a solana-test-validator via command line. I think anchor may use command line for the JS-based tests. So you could write rust tests, maybe
why it's closed?
@AuroraLantean @beautyfree The solana-test-validator
CLI command has a flag --warp-slot
which allows the validator to fast-forward to the provided slot on startup.
Is the proposed issue here regarding fast-forwarding an already running test validator? Or is --warp-slot
sufficient?
should I create another issue if I need fast-forwarding for an already running test validator?
should I create another issue if I need fast-forwarding for an already running test validator?
Sure, on https://github.com/anza-xyz/agave.
should I create another issue if I need fast-forwarding for an already running test validator?
Sure, on https://github.com/anza-xyz/agave.
Since it's been awhile, I opened up an issue for this feature. https://github.com/anza-xyz/agave/issues/1709
Problem
I cannot make solana-test-validator go forward in time so I cannot test how the deployed programs can react in different time. For example, different reward token amounts are given for different staked token amounts and different staked time period
Proposed Solution
1) make it available to set solana-test-validator's time to a different time in the future 2) make it available to allow Anchor testing environment to integrate above feature into testing