Add command to create genesis accounts (#5343) (#5371)

automerge
This commit is contained in:
mergify[bot]
2019-07-31 17:13:40 -07:00
committed by Grimes
parent 1a0003fbcc
commit c00bb42ecd
10 changed files with 402 additions and 279 deletions

View File

@@ -29,7 +29,6 @@ use std::fs::remove_dir_all;
use std::io::{Error, ErrorKind, Result};
use std::sync::Arc;
use solana_librapay_api::librapay_transaction;
use solana_move_loader_api;
pub struct ValidatorInfo {
@@ -118,7 +117,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 {
@@ -165,11 +163,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!());
@@ -180,7 +173,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,
@@ -219,7 +211,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..])