Add command to create genesis accounts (#5343)

This commit is contained in:
Jack May
2019-07-30 23:43:12 -07:00
committed by GitHub
parent bd7e269280
commit 6d7cb23c61
10 changed files with 402 additions and 279 deletions

View File

@ -30,7 +30,6 @@ use std::io::{Error, ErrorKind, Result};
use std::path::PathBuf;
use std::sync::Arc;
use solana_librapay_api::librapay_transaction;
use solana_move_loader_api;
pub struct ValidatorInfo {
@ -119,7 +118,6 @@ pub struct LocalCluster {
pub genesis_block: GenesisBlock,
replicators: Vec<Replicator>,
pub replicator_infos: HashMap<Pubkey, ReplicatorInfo>,
pub libra_mint_keypair: Arc<Keypair>,
}
impl LocalCluster {
@ -166,11 +164,6 @@ impl LocalCluster {
storage_keypair.pubkey(),
storage_contract::create_validator_storage_account(leader_pubkey, 1),
));
let libra_mint_keypair = Keypair::new();
genesis_block.accounts.push((
libra_mint_keypair.pubkey(),
librapay_transaction::create_libra_genesis_account(10_000),
));
genesis_block
.native_instruction_processors
.push(solana_storage_program!());
@ -181,7 +174,6 @@ impl LocalCluster {
let (leader_ledger_path, _blockhash) = create_new_tmp_ledger!(&genesis_block);
let leader_contact_info = leader_node.info.clone();
let leader_storage_keypair = Arc::new(storage_keypair);
let libra_mint_keypair = Arc::new(libra_mint_keypair);
let leader_voting_keypair = Arc::new(voting_keypair);
let leader_server = Validator::new(
leader_node,
@ -220,7 +212,6 @@ impl LocalCluster {
fullnode_infos,
replicator_infos: HashMap::new(),
listener_infos: HashMap::new(),
libra_mint_keypair,
};
for (stake, validator_config) in (&config.node_stakes[1..])