automerge
This commit is contained in:
		@@ -164,7 +164,6 @@ fn main() -> Result<(), Box<dyn error::Error>> {
 | 
				
			|||||||
        )
 | 
					        )
 | 
				
			||||||
        .arg(
 | 
					        .arg(
 | 
				
			||||||
            Arg::with_name("bootstrap_vote_pubkey_file")
 | 
					            Arg::with_name("bootstrap_vote_pubkey_file")
 | 
				
			||||||
                .short("s")
 | 
					 | 
				
			||||||
                .long("bootstrap-vote-pubkey")
 | 
					                .long("bootstrap-vote-pubkey")
 | 
				
			||||||
                .value_name("BOOTSTRAP VOTE PUBKEY")
 | 
					                .value_name("BOOTSTRAP VOTE PUBKEY")
 | 
				
			||||||
                .takes_value(true)
 | 
					                .takes_value(true)
 | 
				
			||||||
@@ -173,13 +172,19 @@ fn main() -> Result<(), Box<dyn error::Error>> {
 | 
				
			|||||||
        )
 | 
					        )
 | 
				
			||||||
        .arg(
 | 
					        .arg(
 | 
				
			||||||
            Arg::with_name("bootstrap_stake_pubkey_file")
 | 
					            Arg::with_name("bootstrap_stake_pubkey_file")
 | 
				
			||||||
                .short("k")
 | 
					 | 
				
			||||||
                .long("bootstrap-stake-pubkey")
 | 
					                .long("bootstrap-stake-pubkey")
 | 
				
			||||||
                .value_name("BOOTSTRAP STAKE PUBKEY")
 | 
					                .value_name("BOOTSTRAP STAKE PUBKEY")
 | 
				
			||||||
                .takes_value(true)
 | 
					                .takes_value(true)
 | 
				
			||||||
                .required(true)
 | 
					                .required(true)
 | 
				
			||||||
                .help("Path to file containing the bootstrap leader's staking pubkey"),
 | 
					                .help("Path to file containing the bootstrap leader's staking pubkey"),
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
					        .arg(
 | 
				
			||||||
 | 
					            Arg::with_name("bootstrap_stake_authorized_pubkey_file")
 | 
				
			||||||
 | 
					                .long("bootstrap-stake-authorized-pubkey")
 | 
				
			||||||
 | 
					                .value_name("BOOTSTRAP STAKE AUTHORIZED PUBKEY")
 | 
				
			||||||
 | 
					                .takes_value(true)
 | 
				
			||||||
 | 
					                .help("Path to file containing the pubkey authorized to manage the bootstrap leader's stake [default: --bootstrap-leader-pubkey]"),
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
        .arg(
 | 
					        .arg(
 | 
				
			||||||
            Arg::with_name("bootstrap_storage_pubkey_file")
 | 
					            Arg::with_name("bootstrap_storage_pubkey_file")
 | 
				
			||||||
                .long("bootstrap-storage-pubkey")
 | 
					                .long("bootstrap-storage-pubkey")
 | 
				
			||||||
@@ -326,6 +331,8 @@ fn main() -> Result<(), Box<dyn error::Error>> {
 | 
				
			|||||||
    let bootstrap_leader_pubkey = required_pubkey(&matches, "bootstrap_leader_pubkey_file")?;
 | 
					    let bootstrap_leader_pubkey = required_pubkey(&matches, "bootstrap_leader_pubkey_file")?;
 | 
				
			||||||
    let bootstrap_vote_pubkey = required_pubkey(&matches, "bootstrap_vote_pubkey_file")?;
 | 
					    let bootstrap_vote_pubkey = required_pubkey(&matches, "bootstrap_vote_pubkey_file")?;
 | 
				
			||||||
    let bootstrap_stake_pubkey = required_pubkey(&matches, "bootstrap_stake_pubkey_file")?;
 | 
					    let bootstrap_stake_pubkey = required_pubkey(&matches, "bootstrap_stake_pubkey_file")?;
 | 
				
			||||||
 | 
					    let bootstrap_stake_authorized_pubkey =
 | 
				
			||||||
 | 
					        pubkey_of(&matches, "bootstrap_stake_authorized_pubkey_file");
 | 
				
			||||||
    let bootstrap_storage_pubkey = pubkey_of(&matches, "bootstrap_storage_pubkey_file");
 | 
					    let bootstrap_storage_pubkey = pubkey_of(&matches, "bootstrap_storage_pubkey_file");
 | 
				
			||||||
    let faucet_pubkey = pubkey_of(&matches, "faucet_pubkey_file");
 | 
					    let faucet_pubkey = pubkey_of(&matches, "faucet_pubkey_file");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -339,7 +346,9 @@ fn main() -> Result<(), Box<dyn error::Error>> {
 | 
				
			|||||||
        vote_state::create_account(&bootstrap_vote_pubkey, &bootstrap_leader_pubkey, 0, 1);
 | 
					        vote_state::create_account(&bootstrap_vote_pubkey, &bootstrap_leader_pubkey, 0, 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let bootstrap_leader_stake_account = stake_state::create_account(
 | 
					    let bootstrap_leader_stake_account = stake_state::create_account(
 | 
				
			||||||
        &bootstrap_leader_pubkey,
 | 
					        bootstrap_stake_authorized_pubkey
 | 
				
			||||||
 | 
					            .as_ref()
 | 
				
			||||||
 | 
					            .unwrap_or(&bootstrap_leader_pubkey),
 | 
				
			||||||
        &bootstrap_vote_pubkey,
 | 
					        &bootstrap_vote_pubkey,
 | 
				
			||||||
        &bootstrap_leader_vote_account,
 | 
					        &bootstrap_leader_vote_account,
 | 
				
			||||||
        &rent,
 | 
					        &rent,
 | 
				
			||||||
@@ -457,7 +466,8 @@ fn main() -> Result<(), Box<dyn error::Error>> {
 | 
				
			|||||||
    create_new_ledger(&ledger_path, &genesis_config)?;
 | 
					    create_new_ledger(&ledger_path, &genesis_config)?;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    println!(
 | 
					    println!(
 | 
				
			||||||
        "Genesis mode: {:?} hashes per tick: {:?} slots_per_epoch: {} capitalization: {}SOL in {} accounts",
 | 
					        "Genesis hash: {}\nOperating mode: {:?}\nHashes per tick: {:?}\nSlots per epoch: {}\nCapitalization: {} SOL in {} accounts",
 | 
				
			||||||
 | 
					        genesis_config.hash(),
 | 
				
			||||||
        operating_mode,
 | 
					        operating_mode,
 | 
				
			||||||
        genesis_config.poh_config.hashes_per_tick,
 | 
					        genesis_config.poh_config.hashes_per_tick,
 | 
				
			||||||
        slots_per_epoch,
 | 
					        slots_per_epoch,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user