Update terminology for block height and genesis block (#6782)
This commit is contained in:
parent
a684984f8b
commit
e420800aeb
|
@ -20,7 +20,7 @@ A contiguous set of [entries](terminology.md#entry) on the ledger covered by a [
|
|||
|
||||
## block height
|
||||
|
||||
The number of [blocks](terminology.md#block) beneath the current block. The first block after the [genesis block](terminology.md#genesis-block) has height zero.
|
||||
The number of [blocks](terminology.md#block) beneath the current block. The first block after the [genesis block](terminology.md#genesis-block) has height one.
|
||||
|
||||
## block id
|
||||
|
||||
|
@ -96,7 +96,11 @@ A [ledger](terminology.md#ledger) derived from common entries but then diverged.
|
|||
|
||||
## genesis block
|
||||
|
||||
The configuration file that prepares the [ledger](terminology.md#ledger) for the first [block](terminology.md#block).
|
||||
The first [block](terminology.md#block) in the chain.
|
||||
|
||||
## genesis config
|
||||
|
||||
The configuration file that prepares the [ledger](terminology.md#ledger) for the [genesis block](terminology.md#genesis-block).
|
||||
|
||||
## hash
|
||||
|
||||
|
@ -114,10 +118,6 @@ A [public key](terminology.md#public-key) and corresponding [private key](termin
|
|||
|
||||
A fractional [native token](terminology.md#native-token) with the value of 0.000000001 [sol](terminology.md#sol).
|
||||
|
||||
## loader
|
||||
|
||||
A [program](terminology.md#program) with the ability to interpret the binary encoding of other on-chain programs.
|
||||
|
||||
## leader
|
||||
|
||||
The role of a [validator](terminology.md#validator) when it is appending [entries](terminology.md#entry) to the [ledger](terminology.md#ledger).
|
||||
|
@ -142,6 +142,10 @@ A [hash](terminology.md#hash) of the [validator's state](terminology.md#bank-sta
|
|||
|
||||
A type of [client](terminology.md#client) that can verify it's pointing to a valid [cluster](terminology.md#cluster). It performs more ledger verification than a [thin client](terminology.md#thin-client) and less than a [validator](terminology.md#validator).
|
||||
|
||||
## loader
|
||||
|
||||
A [program](terminology.md#program) with the ability to interpret the binary encoding of other on-chain programs.
|
||||
|
||||
## lockout
|
||||
|
||||
The duration of time for which a [validator](terminology.md#validator) is unable to [vote](terminology.md#ledger-vote) on another [fork](terminology.md#fork).
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue