mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-16 17:07:35 +00:00
Tighten documentation on Block::number
This commit is contained in:
parent
669b2fef72
commit
cbebaa1349
1 changed files with 5 additions and 2 deletions
|
@ -79,10 +79,13 @@ pub struct Block {
|
|||
}
|
||||
|
||||
impl Block {
|
||||
/// The zero-index position of this block within the blockchain.
|
||||
/// The zero-indexed position of this block within the blockchain.
|
||||
///
|
||||
/// This information comes from the Block's miner transaction. If the miner transaction isn't
|
||||
/// structed as expected, this will return None.
|
||||
/// structed as expected, this will return None. This will return Some for any Block which would
|
||||
/// pass the consensus rules.
|
||||
// https://github.com/monero-project/monero/blob/a1dc85c5373a30f14aaf7dcfdd95f5a7375d3623
|
||||
// /src/cryptonote_core/blockchain.cpp#L1365-L1382
|
||||
pub fn number(&self) -> Option<usize> {
|
||||
match &self.miner_transaction {
|
||||
Transaction::V1 { prefix, .. } | Transaction::V2 { prefix, .. } => {
|
||||
|
|
Loading…
Reference in a new issue