track bank size (#7144)

* track bank size

* support non-linux a bit better
This commit is contained in:
Rob Walker
2019-12-02 13:47:20 -08:00
committed by GitHub
parent 7f71a0ba37
commit f9df17d8d0
5 changed files with 78 additions and 2 deletions

View File

@ -24,3 +24,11 @@ solana-stake-program = { path = "../programs/stake", version = "0.22.0" }
solana-storage-program = { path = "../programs/storage", version = "0.22.0" }
solana-vote-program = { path = "../programs/vote", version = "0.22.0" }
tempfile = "3.1.0"
[[bin]]
name = "solana-genesis"
path = "src/main.rs"
[lib]
name = "solana_genesis"

View File

@ -24,6 +24,7 @@ impl AddressGenerator {
.as_ref(),
)
}
#[allow(clippy::should_implement_trait)]
pub fn next(&mut self) -> Pubkey {
let nth = self.nth;
self.nth += 1;

View File

@ -614,7 +614,7 @@ fn add_stakes(
.sum::<u64>()
}
pub(crate) fn add_genesis_accounts(genesis_config: &mut GenesisConfig) -> u64 {
pub fn add_genesis_accounts(genesis_config: &mut GenesisConfig) -> u64 {
add_stakes(
genesis_config,
&BATCH_ONE_STAKER_INFOS,

View File

@ -1,3 +1,8 @@
pub mod address_generator;
pub mod genesis_accounts;
pub mod stakes;
pub mod unlocks;
use serde::{Deserialize, Serialize};
/// An account where the data is encoded as a Base64 string.