Add first leader to genesis (#1681)

* Add first leader to genesis entries, consume in genesis.sh

* Set bootstrap leader in the bank on startup, remove instantiation of bootstrap leader from bin/fullnode

* Remove need to initialize bootstrap leader in leader_scheduler, now can be read from genesis entries

* Add separate interface new_with_leader() in mint for creating genesis leader entries
This commit is contained in:
carllin
2018-11-02 14:32:05 -07:00
committed by GitHub
parent a8481215fa
commit 298bd6479a
20 changed files with 427 additions and 208 deletions

View File

@@ -14,7 +14,7 @@ use solana::entry::Entry;
use solana::hash::hash;
use solana::mint::Mint;
use solana::packet::to_packets_chunked;
use solana::signature::{KeypairUtil, Signature};
use solana::signature::{Keypair, KeypairUtil, Signature};
use solana::system_transaction::SystemTransaction;
use solana::transaction::Transaction;
use solana_sdk::pubkey::Pubkey;
@@ -78,7 +78,8 @@ fn bench_banking_stage_multi_accounts(bencher: &mut Bencher) {
mint.last_id(),
0,
);
assert!(bank.process_transaction(&fund).is_ok());
let x = bank.process_transaction(&fund);
assert!(x.is_ok());
});
//sanity check, make sure all the transactions can execute sequentially
transactions.iter().for_each(|tx| {