Add option to load accounts from file

This introduces the `--clone-from-file` option for
solana-test-validator. It allows specifying any number of files
(without extension) containing account info and data, which will be
loaded at genesis. This is similar to `--bpf-program` for programs
loading.

The files will be searched for in the CWD or in `tests/fixtures`.

Example: `solana-test-validator --clone-from-file SRM_token USD_token`
(cherry picked from commit 9b06d64eb8)

# Conflicts:
#	test-validator/Cargo.toml
This commit is contained in:
losman0s
2021-12-11 22:17:57 +01:00
committed by Michael Vines
parent 7dba8bb49f
commit a462c58594
7 changed files with 107 additions and 8 deletions

View File

@ -14,6 +14,7 @@ starts a full-featured, single-node cluster on the developer's workstation.
- Direct [on-chain program](on-chain-programs/overview) deployment
(`--bpf-program ...`)
- Clone accounts from a public cluster, including programs (`--clone ...`)
- Load accounts from files
- Configurable transaction history retention (`--limit-ledger-size ...`)
- Configurable epoch length (`--slots-per-epoch ...`)
- Jump to an arbitrary slot (`--warp-slot ...`)