Update terminology for block height and genesis block (#6782)

This commit is contained in:
Justin Starry
2019-11-06 23:09:03 -05:00
committed by GitHub
parent a684984f8b
commit e420800aeb
2 changed files with 19 additions and 6 deletions

View File

@@ -1682,6 +1682,15 @@ mod tests {
assert_eq!(rent.lamports_per_byte_year, 5);
}
#[test]
fn test_bank_block_height() {
let (genesis_block, _mint_keypair) = create_genesis_block(1);
let bank0 = Arc::new(Bank::new(&genesis_block));
assert_eq!(bank0.block_height(), 0);
let bank1 = Arc::new(new_from_parent(&bank0));
assert_eq!(bank1.block_height(), 1);
}
#[test]
fn test_bank_capitalization() {
let bank = Arc::new(Bank::new(&GenesisBlock {